Mercurial > projects > dcrypt
changeset 3:a5789a7b3b3b
Fixed error in hash copy() functions where I forgot to copy the length of the message. Now, twice as jank! =)
author | Thomas Dixon <reikon@reikon.us> |
---|---|
date | Thu, 14 Aug 2008 01:13:26 -0400 |
parents | 71aae178f89a |
children | 3de3a2de13a0 |
files | dcrypt/crypto/hashes/MD5.d dcrypt/crypto/hashes/SHA1.d dcrypt/crypto/hashes/SHA224.d dcrypt/crypto/hashes/SHA256.d dcrypt/crypto/hashes/SHA384.d dcrypt/crypto/hashes/SHA512.d |
diffstat | 6 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/dcrypt/crypto/hashes/MD5.d Wed Aug 13 22:01:19 2008 -0400 +++ b/dcrypt/crypto/hashes/MD5.d Thu Aug 14 01:13:26 2008 -0400 @@ -212,6 +212,7 @@ MD5 copy() { MD5 h = new MD5(buffer[0..index]); + h.bytes = bytes; h.h0 = h0; h.h1 = h1; h.h2 = h2;
--- a/dcrypt/crypto/hashes/SHA1.d Wed Aug 13 22:01:19 2008 -0400 +++ b/dcrypt/crypto/hashes/SHA1.d Thu Aug 14 01:13:26 2008 -0400 @@ -163,6 +163,7 @@ SHA1 copy() { SHA1 h = new SHA1(buffer[0..index]); + h.bytes = bytes; h.h0 = h0; h.h1 = h1; h.h2 = h2;
--- a/dcrypt/crypto/hashes/SHA224.d Wed Aug 13 22:01:19 2008 -0400 +++ b/dcrypt/crypto/hashes/SHA224.d Thu Aug 14 01:13:26 2008 -0400 @@ -56,6 +56,7 @@ SHA224 copy() { SHA224 h = new SHA224(buffer[0..index]); + h.bytes = bytes; h.h0 = h0; h.h1 = h1; h.h2 = h2;
--- a/dcrypt/crypto/hashes/SHA256.d Wed Aug 13 22:01:19 2008 -0400 +++ b/dcrypt/crypto/hashes/SHA256.d Thu Aug 14 01:13:26 2008 -0400 @@ -145,6 +145,7 @@ SHA256 copy() { SHA256 h = new SHA256(buffer[0..index]); + h.bytes = bytes; h.h0 = h0; h.h1 = h1; h.h2 = h2;