diff options
-rw-r--r-- | include/sha160.h | 4 | ||||
-rw-r--r-- | modules/alg_ia32/sha160.cpp | 8 | ||||
-rw-r--r-- | src/sha160.cpp | 8 |
3 files changed, 18 insertions, 2 deletions
diff --git a/include/sha160.h b/include/sha160.h index 554930436..ac46863db 100644 --- a/include/sha160.h +++ b/include/sha160.h @@ -19,13 +19,13 @@ class SHA_160 : public MDx_HashFunction void clear() throw(); std::string name() const { return "SHA-160"; } HashFunction* clone() const { return new SHA_160; } - SHA_160() : MDx_HashFunction(20, 64, true, true) { clear(); } + SHA_160(); private: void hash(const byte[]); void copy_out(byte[]); SecureBuffer<u32bit, 5> digest; - SecureBuffer<u32bit, 80> W; + SecureVector<u32bit> W; }; } diff --git a/modules/alg_ia32/sha160.cpp b/modules/alg_ia32/sha160.cpp index 62a5c9635..754f8a01c 100644 --- a/modules/alg_ia32/sha160.cpp +++ b/modules/alg_ia32/sha160.cpp @@ -41,4 +41,12 @@ void SHA_160::clear() throw() digest[4] = 0xC3D2E1F0; } +/************************************************* +* SHA_160 Constructor * +*************************************************/ +SHA_160::SHA_160() : MDx_HashFunction(20, 64, true, true), W(80) + { + clear(); + } + } diff --git a/src/sha160.cpp b/src/sha160.cpp index a61c556aa..d1b5ad006 100644 --- a/src/sha160.cpp +++ b/src/sha160.cpp @@ -120,4 +120,12 @@ void SHA_160::clear() throw() digest[4] = 0xC3D2E1F0; } +/************************************************* +* SHA_160 Constructor * +*************************************************/ +SHA_160::SHA_160() : MDx_HashFunction(20, 64, true, true), W(80) + { + clear(); + } + } |