aboutsummaryrefslogtreecommitdiffstats
path: root/src/hash/fork256
diff options
context:
space:
mode:
Diffstat (limited to 'src/hash/fork256')
-rw-r--r--src/hash/fork256/fork256.cpp8
-rw-r--r--src/hash/fork256/fork256.h2
-rw-r--r--src/hash/fork256/info.txt9
3 files changed, 5 insertions, 14 deletions
diff --git a/src/hash/fork256/fork256.cpp b/src/hash/fork256/fork256.cpp
index f80bff43a..bd85dfd7c 100644
--- a/src/hash/fork256/fork256.cpp
+++ b/src/hash/fork256/fork256.cpp
@@ -66,9 +66,7 @@ void FORK_256::compress_n(const byte input[], u32bit blocks)
G1 = G2 = G3 = G4 = digest[6];
H1 = H2 = H3 = H4 = digest[7];
- for(u32bit j = 0; j != 16; ++j)
- M[j] = load_be<u32bit>(input, j);
- input += HASH_BLOCK_SIZE;
+ load_be(M.begin(), input, M.size());
step(A1, B1, C1, D1, E1, F1, G1, H1, M[ 0], M[ 1], DELTA[ 0], DELTA[ 1]);
step(A2, B2, C2, D2, E2, F2, G2, H2, M[14], M[15], DELTA[15], DELTA[14]);
@@ -118,6 +116,8 @@ void FORK_256::compress_n(const byte input[], u32bit blocks)
digest[5] += (F1 + F2) ^ (F3 + F4);
digest[6] += (G1 + G2) ^ (G3 + G4);
digest[7] += (H1 + H2) ^ (H3 + H4);
+
+ input += HASH_BLOCK_SIZE;
}
}
@@ -133,7 +133,7 @@ void FORK_256::copy_out(byte output[])
/*
* Clear memory of sensitive data
*/
-void FORK_256::clear() throw()
+void FORK_256::clear()
{
MDx_HashFunction::clear();
digest[0] = 0x6A09E667;
diff --git a/src/hash/fork256/fork256.h b/src/hash/fork256/fork256.h
index 70d336cc9..f535370e6 100644
--- a/src/hash/fork256/fork256.h
+++ b/src/hash/fork256/fork256.h
@@ -18,7 +18,7 @@ namespace Botan {
class BOTAN_DLL FORK_256 : public MDx_HashFunction
{
public:
- void clear() throw();
+ void clear();
std::string name() const { return "FORK-256"; }
HashFunction* clone() const { return new FORK_256; }
FORK_256() : MDx_HashFunction(32, 64, true, true) { clear(); }
diff --git a/src/hash/fork256/info.txt b/src/hash/fork256/info.txt
index ae0c9f1a4..c2f8c47f2 100644
--- a/src/hash/fork256/info.txt
+++ b/src/hash/fork256/info.txt
@@ -1,14 +1,5 @@
-realname "FORK-256"
-
define FORK_256
-load_on auto
-
-<add>
-fork256.cpp
-fork256.h
-</add>
-
<requires>
mdx_hash
</requires>