diff options
author | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2007-04-16 00:32:27 +0000 |
---|---|---|
committer | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2007-04-16 00:32:27 +0000 |
commit | 28d0351a8f22f7e686ce5e833469e8c1429316ef (patch) | |
tree | ebc197718596655cd2f5c7da36d6ce9c4604cf41 /fipsalgt.cpp | |
parent | 14115d4a662fd82ac1368756855f03bc2e02ac38 (diff) | |
download | cryptopp-28d0351a8f22f7e686ce5e833469e8c1429316ef.tar.gz |
handle new FIPS test vector format
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@309 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'fipsalgt.cpp')
-rw-r--r-- | fipsalgt.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fipsalgt.cpp b/fipsalgt.cpp index 096baa8..79d7785 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") { |