aboutsummaryrefslogtreecommitdiffstats
path: root/src/hash/md5
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-11-03 23:41:56 +0000
committerlloyd <[email protected]>2009-11-03 23:41:56 +0000
commit30f6169ebf9164a6fdb35519030975440a5b07d7 (patch)
tree8435e826dd692066c6c3fc56d02f8f4479188c02 /src/hash/md5
parentcb0d4a18f2fc77a40f6055fedb43b78606068b7b (diff)
parent226d96ee4e64994beb9ec9436a29ac6656d61924 (diff)
propagate from branch 'net.randombit.botan.1_8' (head 6e8c18515725a70923b34118951252723dd4c29a)
to branch 'net.randombit.botan' (head 77ba4ea5a4be36d6d029bcc852b2271edff0d679)
Diffstat (limited to 'src/hash/md5')
-rw-r--r--src/hash/md5/info.txt9
-rw-r--r--src/hash/md5/md5.cpp8
-rw-r--r--src/hash/md5/md5.h2
3 files changed, 5 insertions, 14 deletions
diff --git a/src/hash/md5/info.txt b/src/hash/md5/info.txt
index 525a45ab5..a4ad1462c 100644
--- a/src/hash/md5/info.txt
+++ b/src/hash/md5/info.txt
@@ -1,14 +1,5 @@
-realname "MD5"
-
define MD5
-load_on auto
-
-<add>
-md5.cpp
-md5.h
-</add>
-
<requires>
mdx_hash
</requires>
diff --git a/src/hash/md5/md5.cpp b/src/hash/md5/md5.cpp
index 7c280aab7..8c1e5a8e1 100644
--- a/src/hash/md5/md5.cpp
+++ b/src/hash/md5/md5.cpp
@@ -64,9 +64,7 @@ void MD5::compress_n(const byte input[], u32bit blocks)
for(u32bit i = 0; i != blocks; ++i)
{
- for(u32bit j = 0; j != 16; ++j)
- M[j] = load_le<u32bit>(input, j);
- input += HASH_BLOCK_SIZE;
+ load_le(M.begin(), input, M.size());
FF(A,B,C,D,M[ 0], 7,0xD76AA478); FF(D,A,B,C,M[ 1],12,0xE8C7B756);
FF(C,D,A,B,M[ 2],17,0x242070DB); FF(B,C,D,A,M[ 3],22,0xC1BDCEEE);
@@ -108,6 +106,8 @@ void MD5::compress_n(const byte input[], u32bit blocks)
B = (digest[1] += B);
C = (digest[2] += C);
D = (digest[3] += D);
+
+ input += HASH_BLOCK_SIZE;
}
}
@@ -123,7 +123,7 @@ void MD5::copy_out(byte output[])
/*
* Clear memory of sensitive data
*/
-void MD5::clear() throw()
+void MD5::clear()
{
MDx_HashFunction::clear();
M.clear();
diff --git a/src/hash/md5/md5.h b/src/hash/md5/md5.h
index 85f684d8b..456a02c28 100644
--- a/src/hash/md5/md5.h
+++ b/src/hash/md5/md5.h
@@ -18,7 +18,7 @@ namespace Botan {
class BOTAN_DLL MD5 : public MDx_HashFunction
{
public:
- void clear() throw();
+ void clear();
std::string name() const { return "MD5"; }
HashFunction* clone() const { return new MD5; }
MD5() : MDx_HashFunction(16, 64, false, true) { clear(); }