aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-04-15 00:08:04 -0400
committerJack Lloyd <[email protected]>2016-04-15 00:08:04 -0400
commit0b06b4f61b497c7ad9869441f12ee287b65cde36 (patch)
treea0282a5024751e4c7333b09221fd91c1b855c746 /src/lib
parent5d34bc57073db07db0b47eb1dd784c1c6fac9c8d (diff)
Empty the key/tweak containers which is used to signal the key was set
Fix exception message
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/block/threefish/threefish.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/block/threefish/threefish.cpp b/src/lib/block/threefish/threefish.cpp
index 958175bb8..c8e2aff85 100644
--- a/src/lib/block/threefish/threefish.cpp
+++ b/src/lib/block/threefish/threefish.cpp
@@ -221,7 +221,7 @@ void Threefish_512::decrypt_n(const byte in[], byte out[], size_t blocks) const
void Threefish_512::set_tweak(const byte tweak[], size_t len)
{
if(len != 16)
- throw Exception("Unsupported twofish tweak length");
+ throw Exception("Threefish-512 requires 128 bit tweak");
m_T.resize(3);
m_T[0] = load_le<u64bit>(tweak, 0);
m_T[1] = load_le<u64bit>(tweak, 1);
@@ -246,8 +246,8 @@ void Threefish_512::key_schedule(const byte key[], size_t)
void Threefish_512::clear()
{
- zeroise(m_K);
- zeroise(m_T);
+ zap(m_K);
+ zap(m_T);
}
}