summaryrefslogtreecommitdiff
path: root/fipsalgt.cpp
diff options
context:
space:
mode:
authorweidai <weidai11@users.noreply.github.com>2007-04-16 00:32:27 +0000
committerweidai <weidai11@users.noreply.github.com>2007-04-16 00:32:27 +0000
commitce5e051e4296f7a64651df773f9be4a1621727a4 (patch)
treeebc197718596655cd2f5c7da36d6ce9c4604cf41 /fipsalgt.cpp
parentb040459503c5017776512c823cf285ab1a74d8df (diff)
downloadcryptopp-git-ce5e051e4296f7a64651df773f9be4a1621727a4.tar.gz
handle new FIPS test vector format
Diffstat (limited to 'fipsalgt.cpp')
-rw-r--r--fipsalgt.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/fipsalgt.cpp b/fipsalgt.cpp
index 096baa87..79d77857 100644
--- a/fipsalgt.cpp
+++ b/fipsalgt.cpp
@@ -746,13 +746,11 @@ protected:
if (m_algorithm == "RNG")
{
- key.resize(16);
- HexDecoder hexDec(new ArraySink(key, key.size()));
- StringSource(m_data["Key1"], true, new Redirector(hexDec));
- StringSource(m_data["Key2"], true, new Redirector(hexDec));
+ key.resize(24);
+ StringSource(m_data["Key1"] + m_data["Key2"] + m_data["Key3"], true, new HexDecoder(new ArraySink(key, key.size())));
SecByteBlock seed(m_data2[INPUT]), dt(m_data2[IV]), r(8);
- X917RNG rng(new DES_EDE2::Encryption(key), seed, dt);
+ X917RNG rng(new DES_EDE3::Encryption(key, key.size()), seed, dt);
if (m_test == "MCT")
{