From 28d0351a8f22f7e686ce5e833469e8c1429316ef Mon Sep 17 00:00:00 2001 From: weidai Date: Mon, 16 Apr 2007 00:32:27 +0000 Subject: 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 --- fipsalgt.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'fipsalgt.cpp') 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") { -- cgit v1.2.1