From 0178a6d33ff6afc7d0305619d3d250235ae55d09 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sat, 27 Sep 2014 16:04:07 +0200 Subject: Optimize code space and solve the Serpent issue (https://sourceforge.net/p/veracrypt/discussion/technical/thread/fb09633a/#6406) by removing key length parameter from serpent_set_key and twofish_set_key --- src/Volume/Cipher.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Volume') diff --git a/src/Volume/Cipher.cpp b/src/Volume/Cipher.cpp index 5708e6e0..1a5a1295 100644 --- a/src/Volume/Cipher.cpp +++ b/src/Volume/Cipher.cpp @@ -211,7 +211,7 @@ namespace VeraCrypt void CipherSerpent::SetCipherKey (const byte *key) { - serpent_set_key (key, static_cast (GetKeySize ()), ScheduledKey); + serpent_set_key (key, ScheduledKey); } @@ -233,7 +233,7 @@ namespace VeraCrypt void CipherTwofish::SetCipherKey (const byte *key) { - twofish_set_key ((TwofishInstance *) ScheduledKey.Ptr(), (unsigned int *) key, static_cast (GetKeySize ()) * 8); + twofish_set_key ((TwofishInstance *) ScheduledKey.Ptr(), (unsigned int *) key); } -- cgit v1.2.3