From 8292126d81f89e703e3c92f1fc8c8bf1f5d9c4a8 Mon Sep 17 00:00:00 2001 From: weidai Date: Thu, 29 Apr 2004 16:00:39 +0000 Subject: add CFB mode FIPS variant git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@165 57ff6487-cd31-0410-9ec3-f628ee90f5f0 --- dlltest.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'dlltest.cpp') diff --git a/dlltest.cpp b/dlltest.cpp index a8b2813..ed9337a 100644 --- a/dlltest.cpp +++ b/dlltest.cpp @@ -60,20 +60,20 @@ void FIPS140_SampleApplication() byte ciphertext[24]; byte decrypted[24]; - CFB_Mode::Encryption encryption_DES_EDE3_CBC; - encryption_DES_EDE3_CBC.SetKeyWithIV(key, sizeof(key), iv); - encryption_DES_EDE3_CBC.ProcessString(ciphertext, plaintext, 24); + CFB_FIPS_Mode::Encryption encryption_DES_EDE3_CFB; + encryption_DES_EDE3_CFB.SetKeyWithIV(key, sizeof(key), iv); + encryption_DES_EDE3_CFB.ProcessString(ciphertext, plaintext, 23); - CFB_Mode::Decryption decryption_DES_EDE3_CBC; - decryption_DES_EDE3_CBC.SetKeyWithIV(key, sizeof(key), iv); - decryption_DES_EDE3_CBC.ProcessString(decrypted, ciphertext, 24); + CFB_FIPS_Mode::Decryption decryption_DES_EDE3_CFB; + decryption_DES_EDE3_CFB.SetKeyWithIV(key, sizeof(key), iv); + decryption_DES_EDE3_CFB.ProcessString(decrypted, ciphertext, 24); if (memcmp(plaintext, decrypted, 24) != 0) { - cerr << "DES-EDE3-CBC Encryption/decryption failed.\n"; + cerr << "DES-EDE3-CFB Encryption/decryption failed.\n"; abort(); } - cout << "3. DES-EDE3-CBC Encryption/decryption succeeded.\n"; + cout << "3. DES-EDE3-CFB Encryption/decryption succeeded.\n"; // hash const byte message[] = {'a', 'b', 'c'}; -- cgit v1.2.1