From ce5e051e4296f7a64651df773f9be4a1621727a4 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 --- fipsalgt.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'fipsalgt.cpp') 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") { -- cgit v1.2.1