diff options
Diffstat (limited to 'src/hash')
-rw-r--r-- | src/hash/skein/skein_512.cpp | 6 | ||||
-rw-r--r-- | src/hash/skein/skein_512.h | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/hash/skein/skein_512.cpp b/src/hash/skein/skein_512.cpp index c8a26ae82..eaef641ed 100644 --- a/src/hash/skein/skein_512.cpp +++ b/src/hash/skein/skein_512.cpp @@ -132,6 +132,7 @@ void initial_block(u64bit H[9], u64bit T[3], u32bit output_bits, { clear_mem(H, 9); + // ASCII("SHA3") followed by version (0x0001) code byte config_str[32] = { 0x53, 0x48, 0x41, 0x33, 0x01, 0x00, 0 }; store_le(output_bits, config_str + 8); @@ -140,6 +141,11 @@ void initial_block(u64bit H[9], u64bit T[3], u32bit output_bits, if(personalization != "") { + /* + This is a limitation of this implementation, and not of the + algorithm specification. Could be fixed relatively easily, but + doesn't seem worth the trouble. + */ if(personalization.length() > 64) throw Invalid_Argument("Skein personalization must be <= 64 bytes"); diff --git a/src/hash/skein/skein_512.h b/src/hash/skein/skein_512.h index 2192767ca..fa558fc0d 100644 --- a/src/hash/skein/skein_512.h +++ b/src/hash/skein/skein_512.h @@ -5,8 +5,8 @@ * Distributed under the terms of the Botan license */ -#ifndef BOTAN_SKEIN_H__ -#define BOTAN_SKEIN_H__ +#ifndef BOTAN_SKEIN_512_H__ +#define BOTAN_SKEIN_512_H__ #include <botan/secmem.h> #include <botan/hash.h> @@ -14,7 +14,7 @@ namespace Botan { -class Skein_512 : public HashFunction +class BOTAN_DLL Skein_512 : public HashFunction { public: Skein_512(u32bit output_bits = 512, |