aboutsummaryrefslogtreecommitdiffstats
path: root/src/hash
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-07-03 04:46:47 +0000
committerlloyd <[email protected]>2009-07-03 04:46:47 +0000
commite0555387e440c708294a3593c90d3066ae4a0a55 (patch)
tree1f81e36cd8a919d512acf9ffc61e785d48669177 /src/hash
parentce5cab439b617800f48c94ebaeeb7cd3bd786cfe (diff)
parentd9fea92eecbad7863518bd07f2b80ead41494894 (diff)
propagate from branch 'net.randombit.botan' (head d6d32791adfa878b6fc0dd3a5b65a665b7bbb549)
to branch 'net.randombit.botan.c++0x' (head 54deb0e078aab8cd91c8fd8819d1e6668fc762da)
Diffstat (limited to 'src/hash')
-rw-r--r--src/hash/skein/skein_512.cpp6
-rw-r--r--src/hash/skein/skein_512.h6
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,