diff options
author | lloyd <[email protected]> | 2010-11-02 12:33:16 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-11-02 12:33:16 +0000 |
commit | 4a361f699573ed3ff128ecc9c654863cd55aaa79 (patch) | |
tree | 4e8d4a29abdc937b5dce2c363519429f949e06be /src | |
parent | 05edb9f3e52ce18d0833d612fcfebf1442f859ea (diff) |
Doxygen
Diffstat (limited to 'src')
-rw-r--r-- | src/algo_base/key_spec.h | 26 | ||||
-rw-r--r-- | src/codec/base64/base64.h | 2 | ||||
-rw-r--r-- | src/filters/filter.h | 1 | ||||
-rw-r--r-- | src/hash/md4/md4.h | 10 | ||||
-rw-r--r-- | src/hash/md4_ia32/md4_ia32.cpp | 10 | ||||
-rw-r--r-- | src/hash/md5/md5.h | 10 | ||||
-rw-r--r-- | src/hash/mdx_hash/mdx_hash.h | 1 | ||||
-rw-r--r-- | src/hash/sha1/sha160.h | 7 | ||||
-rw-r--r-- | src/math/numbertheory/curve_gfp.h | 3 | ||||
-rw-r--r-- | src/utils/dyn_load/dyn_load.h | 5 | ||||
-rw-r--r-- | src/utils/rotate.h | 13 |
11 files changed, 77 insertions, 11 deletions
diff --git a/src/algo_base/key_spec.h b/src/algo_base/key_spec.h index 7788bb988..73cd9126f 100644 --- a/src/algo_base/key_spec.h +++ b/src/algo_base/key_spec.h @@ -12,9 +12,16 @@ namespace Botan { +/** +* Represents the length requirements on an algorithm key +*/ class BOTAN_DLL Key_Length_Specification { public: + /** + * Constructor for fixed length keys + * @param keylen the supported key length + */ Key_Length_Specification(size_t keylen) : min_keylen(keylen), max_keylen(keylen), @@ -22,6 +29,12 @@ class BOTAN_DLL Key_Length_Specification { } + /** + * Constructor for variable length keys + * @param min_k the smallest supported key length + * @param max_k the largest supported key length + * @param k_mod the number of bytes the key must be a multiple of + */ Key_Length_Specification(size_t min_k, size_t max_k, size_t k_mod = 1) : @@ -31,6 +44,10 @@ class BOTAN_DLL Key_Length_Specification { } + /** + * @param length is a key length in bytes + * @return true iff this length is a valid length for this algo + */ bool valid_keylength(size_t length) const { return ((length >= min_keylen) && @@ -38,16 +55,25 @@ class BOTAN_DLL Key_Length_Specification (length % keylen_mod == 0)); } + /** + * @return minimum key length in bytes + */ size_t minimum_keylength() const { return min_keylen; } + /** + * @return maximum key length in bytes + */ size_t maximum_keylength() const { return max_keylen; } + /** + * @return key length multiple in bytes + */ size_t keylength_multiple() const { return keylen_mod; diff --git a/src/codec/base64/base64.h b/src/codec/base64/base64.h index 551f3daf8..6daac73d8 100644 --- a/src/codec/base64/base64.h +++ b/src/codec/base64/base64.h @@ -36,7 +36,6 @@ size_t BOTAN_DLL base64_encode(char output[], * Perform base64 encoding * @param input some input * @param input_length length of input in bytes -* @param uppercase should output be upper or lower case? * @return base64adecimal representation of input */ std::string BOTAN_DLL base64_encode(const byte input[], @@ -45,7 +44,6 @@ std::string BOTAN_DLL base64_encode(const byte input[], /** * Perform base64 encoding * @param input some input -* @param uppercase should output be upper or lower case? * @return base64adecimal representation of input */ std::string BOTAN_DLL base64_encode(const MemoryRegion<byte>& input); diff --git a/src/filters/filter.h b/src/filters/filter.h index 2bbaf155c..962b2816e 100644 --- a/src/filters/filter.h +++ b/src/filters/filter.h @@ -69,6 +69,7 @@ class BOTAN_DLL Filter /** * @param in some input for the filter + * @param length the number of bytes of in to send */ void send(const MemoryRegion<byte>& in, size_t length) { diff --git a/src/hash/md4/md4.h b/src/hash/md4/md4.h index 182954834..d37dbe3b2 100644 --- a/src/hash/md4/md4.h +++ b/src/hash/md4/md4.h @@ -30,7 +30,15 @@ class BOTAN_DLL MD4 : public MDx_HashFunction void compress_n(const byte input[], size_t blocks); void copy_out(byte[]); - SecureVector<u32bit> M, digest; + /** + * The message buffer, exposed for use by subclasses (x86 asm) + */ + SecureVector<u32bit> M; + + /** + * The digest value, exposed for use by subclasses (x86 asm) + */ + SecureVector<u32bit> digest; }; } diff --git a/src/hash/md4_ia32/md4_ia32.cpp b/src/hash/md4_ia32/md4_ia32.cpp index 1e3cd64c3..98d3c7a19 100644 --- a/src/hash/md4_ia32/md4_ia32.cpp +++ b/src/hash/md4_ia32/md4_ia32.cpp @@ -9,7 +9,15 @@ namespace Botan { -extern "C" void botan_md4_ia32_compress(u32bit[4], const byte[64], u32bit[16]); +/** +* MD4 compression function in IA-32 asm +* @param digest the current digest +* @param input the input block +* @param M the message buffer +*/ +extern "C" void botan_md4_ia32_compress(u32bit digest[4], + const byte input[64], + u32bit M[16]); /* * MD4 Compression Function diff --git a/src/hash/md5/md5.h b/src/hash/md5/md5.h index b54beeec4..92c023c92 100644 --- a/src/hash/md5/md5.h +++ b/src/hash/md5/md5.h @@ -30,7 +30,15 @@ class BOTAN_DLL MD5 : public MDx_HashFunction void compress_n(const byte[], size_t blocks); void copy_out(byte[]); - SecureVector<u32bit> M, digest; + /** + * The message buffer, exposed for use by subclasses (x86 asm) + */ + SecureVector<u32bit> M; + + /** + * The digest value, exposed for use by subclasses (x86 asm) + */ + SecureVector<u32bit> digest; }; } diff --git a/src/hash/mdx_hash/mdx_hash.h b/src/hash/mdx_hash/mdx_hash.h index 0dfc16b31..9e32ac003 100644 --- a/src/hash/mdx_hash/mdx_hash.h +++ b/src/hash/mdx_hash/mdx_hash.h @@ -19,7 +19,6 @@ class BOTAN_DLL MDx_HashFunction : public HashFunction { public: /** - * @param hash_length is the output length of this hash * @param block_length is the number of bytes per block * @param big_byte_endian specifies if the hash uses big-endian bytes * @param big_bit_endian specifies if the hash uses big-endian bits diff --git a/src/hash/sha1/sha160.h b/src/hash/sha1/sha160.h index 3038039cf..c3b264861 100644 --- a/src/hash/sha1/sha160.h +++ b/src/hash/sha1/sha160.h @@ -44,7 +44,14 @@ class BOTAN_DLL SHA_160 : public MDx_HashFunction void compress_n(const byte[], size_t blocks); void copy_out(byte[]); + /** + * The digest value, exposed for use by subclasses (asm, SSE2) + */ SecureVector<u32bit> digest; + + /** + * The message buffer, exposed for use by subclasses (asm, SSE2) + */ SecureVector<u32bit> W; }; diff --git a/src/math/numbertheory/curve_gfp.h b/src/math/numbertheory/curve_gfp.h index f3c4dc1a1..6c1d220fd 100644 --- a/src/math/numbertheory/curve_gfp.h +++ b/src/math/numbertheory/curve_gfp.h @@ -33,8 +33,7 @@ class BOTAN_DLL CurveGFp * @param a first coefficient * @param b second coefficient */ - CurveGFp(const BigInt& p_in, - const BigInt& a_in, const BigInt& b_in) : + CurveGFp(const BigInt& p, const BigInt& a, const BigInt& b) : p(p_in), a(a_in), b(b_in), reducer_p(p) { r = 1; diff --git a/src/utils/dyn_load/dyn_load.h b/src/utils/dyn_load/dyn_load.h index c8fb31cf0..b37a52e84 100644 --- a/src/utils/dyn_load/dyn_load.h +++ b/src/utils/dyn_load/dyn_load.h @@ -1,4 +1,4 @@ -/** +/* * Dynamically Loaded Object * (C) 2010 Jack Lloyd * @@ -12,6 +12,9 @@ namespace Botan { +/** +* Represents a DLL or shared object +*/ class Dynamically_Loaded_Library { public: diff --git a/src/utils/rotate.h b/src/utils/rotate.h index 5e3eef304..465746e0b 100644 --- a/src/utils/rotate.h +++ b/src/utils/rotate.h @@ -12,14 +12,23 @@ namespace Botan { -/* -* Word Rotation Functions +/** +* Bit rotation left +* @param input the input word +* @param rot the number of bits to rotate +* @return input rotated left by rot bits */ template<typename T> inline T rotate_left(T input, size_t rot) { return static_cast<T>((input << rot) | (input >> (8*sizeof(T)-rot)));; } +/** +* Bit rotation right +* @param input the input word +* @param rot the number of bits to rotate +* @return input rotated right by rot bits +*/ template<typename T> inline T rotate_right(T input, size_t rot) { return static_cast<T>((input >> rot) | (input << (8*sizeof(T)-rot))); |