aboutsummaryrefslogtreecommitdiffstats
path: root/src/hash
diff options
context:
space:
mode:
Diffstat (limited to 'src/hash')
-rw-r--r--src/hash/bmw/bmw_512.h3
-rw-r--r--src/hash/gost_3411/gost_3411.h2
-rw-r--r--src/hash/md2/md2.h2
-rw-r--r--src/hash/md4/md4.h2
-rw-r--r--src/hash/md4_ia32/md4_ia32.h4
-rw-r--r--src/hash/md5_ia32/md5_ia32.h4
-rw-r--r--src/hash/mdx_hash/mdx_hash.h10
-rw-r--r--src/hash/par_hash/par_hash.h4
-rw-r--r--src/hash/rmd128/rmd128.h4
-rw-r--r--src/hash/rmd160/rmd160.h2
-rw-r--r--src/hash/sha1/sha160.h4
-rw-r--r--src/hash/sha1_amd64/sha1_amd64.h4
-rw-r--r--src/hash/sha1_ia32/sha1_ia32.h4
-rw-r--r--src/hash/sha1_sse2/sha1_sse2.h4
-rw-r--r--src/hash/sha2/sha2_32.h8
-rw-r--r--src/hash/sha2/sha2_64.h8
-rw-r--r--src/hash/skein/skein_512.h3
-rw-r--r--src/hash/tiger/tiger.h2
-rw-r--r--src/hash/whirlpool/whrlpool.h2
19 files changed, 44 insertions, 32 deletions
diff --git a/src/hash/bmw/bmw_512.h b/src/hash/bmw/bmw_512.h
index c1c5238bd..d3c9c03c6 100644
--- a/src/hash/bmw/bmw_512.h
+++ b/src/hash/bmw/bmw_512.h
@@ -12,6 +12,9 @@
namespace Botan {
+/**
+* Blue Midnight Wish 512 (Round 2 tweaked version)
+*/
class BOTAN_DLL BMW_512 : public MDx_HashFunction
{
public:
diff --git a/src/hash/gost_3411/gost_3411.h b/src/hash/gost_3411/gost_3411.h
index bedda3da7..04417d6fd 100644
--- a/src/hash/gost_3411/gost_3411.h
+++ b/src/hash/gost_3411/gost_3411.h
@@ -24,7 +24,7 @@ class BOTAN_DLL GOST_34_11 : public HashFunction
HashFunction* clone() const { return new GOST_34_11; }
GOST_34_11();
- protected:
+ private:
void compress_n(const byte input[], u32bit blocks);
void add_data(const byte[], u32bit);
diff --git a/src/hash/md2/md2.h b/src/hash/md2/md2.h
index df056dc12..9d39d8913 100644
--- a/src/hash/md2/md2.h
+++ b/src/hash/md2/md2.h
@@ -12,7 +12,7 @@
namespace Botan {
-/*
+/**
* MD2
*/
class BOTAN_DLL MD2 : public HashFunction
diff --git a/src/hash/md4/md4.h b/src/hash/md4/md4.h
index 843727f6d..98a05b2dd 100644
--- a/src/hash/md4/md4.h
+++ b/src/hash/md4/md4.h
@@ -12,7 +12,7 @@
namespace Botan {
-/*
+/**
* MD4
*/
class BOTAN_DLL MD4 : public MDx_HashFunction
diff --git a/src/hash/md4_ia32/md4_ia32.h b/src/hash/md4_ia32/md4_ia32.h
index f01d148f4..ef8060d3f 100644
--- a/src/hash/md4_ia32/md4_ia32.h
+++ b/src/hash/md4_ia32/md4_ia32.h
@@ -12,8 +12,8 @@
namespace Botan {
-/*
-* MD4
+/**
+* MD4 using x86 assembly
*/
class BOTAN_DLL MD4_IA32 : public MD4
{
diff --git a/src/hash/md5_ia32/md5_ia32.h b/src/hash/md5_ia32/md5_ia32.h
index 723d724de..b65490760 100644
--- a/src/hash/md5_ia32/md5_ia32.h
+++ b/src/hash/md5_ia32/md5_ia32.h
@@ -12,8 +12,8 @@
namespace Botan {
-/*
-* MD5
+/**
+* MD5 in x86 assembly
*/
class BOTAN_DLL MD5_IA32 : public MD5
{
diff --git a/src/hash/mdx_hash/mdx_hash.h b/src/hash/mdx_hash/mdx_hash.h
index 9fba0b799..aaf02449c 100644
--- a/src/hash/mdx_hash/mdx_hash.h
+++ b/src/hash/mdx_hash/mdx_hash.h
@@ -21,9 +21,15 @@ class BOTAN_DLL MDx_HashFunction : public HashFunction
MDx_HashFunction(u32bit, u32bit, bool, bool, u32bit = 8);
virtual ~MDx_HashFunction() {}
protected:
- void add_data(const byte[], u32bit);
+ void add_data(const byte input[], u32bit length);
void final_result(byte output[]);
- virtual void compress_n(const byte block[], u32bit block_n) = 0;
+
+ /**
+ * Run the hash's compression function over a set of blocks
+ * @param blocks the input
+ * @param block_n the number of blocks
+ */
+ virtual void compress_n(const byte blocks[], u32bit block_n) = 0;
void clear();
virtual void copy_out(byte[]) = 0;
diff --git a/src/hash/par_hash/par_hash.h b/src/hash/par_hash/par_hash.h
index 874e491b1..34d69e39a 100644
--- a/src/hash/par_hash/par_hash.h
+++ b/src/hash/par_hash/par_hash.h
@@ -13,8 +13,8 @@
namespace Botan {
-/*
-* Parallel
+/**
+* Parallel Hashes
*/
class BOTAN_DLL Parallel : public HashFunction
{
diff --git a/src/hash/rmd128/rmd128.h b/src/hash/rmd128/rmd128.h
index 9ae43483c..c7c7f4580 100644
--- a/src/hash/rmd128/rmd128.h
+++ b/src/hash/rmd128/rmd128.h
@@ -12,7 +12,7 @@
namespace Botan {
-/*
+/**
* RIPEMD-128
*/
class BOTAN_DLL RIPEMD_128 : public MDx_HashFunction
@@ -22,7 +22,7 @@ class BOTAN_DLL RIPEMD_128 : public MDx_HashFunction
std::string name() const { return "RIPEMD-128"; }
HashFunction* clone() const { return new RIPEMD_128; }
RIPEMD_128() : MDx_HashFunction(16, 64, false, true) { clear(); }
- private:
+ private:
void compress_n(const byte[], u32bit blocks);
void copy_out(byte[]);
diff --git a/src/hash/rmd160/rmd160.h b/src/hash/rmd160/rmd160.h
index 399d5a7c3..0b6e847f0 100644
--- a/src/hash/rmd160/rmd160.h
+++ b/src/hash/rmd160/rmd160.h
@@ -12,7 +12,7 @@
namespace Botan {
-/*
+/**
* RIPEMD-160
*/
class BOTAN_DLL RIPEMD_160 : public MDx_HashFunction
diff --git a/src/hash/sha1/sha160.h b/src/hash/sha1/sha160.h
index cb7e63821..3d46e0c79 100644
--- a/src/hash/sha1/sha160.h
+++ b/src/hash/sha1/sha160.h
@@ -12,8 +12,8 @@
namespace Botan {
-/*
-* SHA-160
+/**
+* NIST's SHA-160
*/
class BOTAN_DLL SHA_160 : public MDx_HashFunction
{
diff --git a/src/hash/sha1_amd64/sha1_amd64.h b/src/hash/sha1_amd64/sha1_amd64.h
index f182627a8..6cf3b0fb7 100644
--- a/src/hash/sha1_amd64/sha1_amd64.h
+++ b/src/hash/sha1_amd64/sha1_amd64.h
@@ -12,8 +12,8 @@
namespace Botan {
-/*
-* SHA-160
+/**
+* SHA-160 in x86-64 assembly
*/
class BOTAN_DLL SHA_160_AMD64 : public SHA_160
{
diff --git a/src/hash/sha1_ia32/sha1_ia32.h b/src/hash/sha1_ia32/sha1_ia32.h
index fd34971cb..f579fbc90 100644
--- a/src/hash/sha1_ia32/sha1_ia32.h
+++ b/src/hash/sha1_ia32/sha1_ia32.h
@@ -12,8 +12,8 @@
namespace Botan {
-/*
-* SHA-160
+/**
+* SHA-160 in x86 assembly
*/
class BOTAN_DLL SHA_160_IA32 : public SHA_160
{
diff --git a/src/hash/sha1_sse2/sha1_sse2.h b/src/hash/sha1_sse2/sha1_sse2.h
index 1c4b4cca7..90935c737 100644
--- a/src/hash/sha1_sse2/sha1_sse2.h
+++ b/src/hash/sha1_sse2/sha1_sse2.h
@@ -12,8 +12,8 @@
namespace Botan {
-/*
-* SHA-160
+/**
+* SHA-160 using SSE2 for the message expansion
*/
class BOTAN_DLL SHA_160_SSE2 : public SHA_160
{
diff --git a/src/hash/sha2/sha2_32.h b/src/hash/sha2/sha2_32.h
index e157fd657..319432122 100644
--- a/src/hash/sha2/sha2_32.h
+++ b/src/hash/sha2/sha2_32.h
@@ -13,8 +13,8 @@
namespace Botan {
-/*
-* SHA-{224,256} Base
+/**
+* Base class for the 32-bit SHA-2 hashes (SHA-224 and SHA-256)
*/
class BOTAN_DLL SHA_224_256_BASE : public MDx_HashFunction
{
@@ -30,7 +30,7 @@ class BOTAN_DLL SHA_224_256_BASE : public MDx_HashFunction
void copy_out(byte[]);
};
-/*
+/**
* SHA-224
*/
class BOTAN_DLL SHA_224 : public SHA_224_256_BASE
@@ -42,7 +42,7 @@ class BOTAN_DLL SHA_224 : public SHA_224_256_BASE
SHA_224() : SHA_224_256_BASE(28) { clear(); }
};
-/*
+/**
* SHA-256
*/
class BOTAN_DLL SHA_256 : public SHA_224_256_BASE
diff --git a/src/hash/sha2/sha2_64.h b/src/hash/sha2/sha2_64.h
index ed261b1c2..5094fc0d2 100644
--- a/src/hash/sha2/sha2_64.h
+++ b/src/hash/sha2/sha2_64.h
@@ -12,8 +12,8 @@
namespace Botan {
-/*
-* SHA-{384,512} Base
+/**
+* Base class for the 64-bit SHA-2 hashes (SHA-384 and SHA-512)
*/
class BOTAN_DLL SHA_384_512_BASE : public MDx_HashFunction
{
@@ -31,7 +31,7 @@ class BOTAN_DLL SHA_384_512_BASE : public MDx_HashFunction
SecureVector<u64bit, 80> W;
};
-/*
+/**
* SHA-384
*/
class BOTAN_DLL SHA_384 : public SHA_384_512_BASE
@@ -43,7 +43,7 @@ class BOTAN_DLL SHA_384 : public SHA_384_512_BASE
SHA_384() : SHA_384_512_BASE(48) { clear(); }
};
-/*
+/**
* SHA-512
*/
class BOTAN_DLL SHA_512 : public SHA_384_512_BASE
diff --git a/src/hash/skein/skein_512.h b/src/hash/skein/skein_512.h
index a633fabcb..b2ec57962 100644
--- a/src/hash/skein/skein_512.h
+++ b/src/hash/skein/skein_512.h
@@ -14,6 +14,9 @@
namespace Botan {
+/**
+* Skein-512, a SHA-3 candidate
+*/
class BOTAN_DLL Skein_512 : public HashFunction
{
public:
diff --git a/src/hash/tiger/tiger.h b/src/hash/tiger/tiger.h
index 918e2de3c..c38df02e7 100644
--- a/src/hash/tiger/tiger.h
+++ b/src/hash/tiger/tiger.h
@@ -12,7 +12,7 @@
namespace Botan {
-/*
+/**
* Tiger
*/
class BOTAN_DLL Tiger : public MDx_HashFunction
diff --git a/src/hash/whirlpool/whrlpool.h b/src/hash/whirlpool/whrlpool.h
index 4711fafa3..e28053d4f 100644
--- a/src/hash/whirlpool/whrlpool.h
+++ b/src/hash/whirlpool/whrlpool.h
@@ -12,7 +12,7 @@
namespace Botan {
-/*
+/**
* Whirlpool
*/
class BOTAN_DLL Whirlpool : public MDx_HashFunction