aboutsummaryrefslogtreecommitdiffstats
path: root/src/hash/md5
diff options
context:
space:
mode:
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(); }