Paul Vriens : rsaenh/tests: Use a 40-bit session key instead of 56-bit.

Alexandre Julliard julliard at winehq.org
Wed Nov 26 07:32:25 CST 2008


Module: wine
Branch: master
Commit: 5da0debbe6d0806506fdb3d0239496ea720e2ed3
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5da0debbe6d0806506fdb3d0239496ea720e2ed3

Author: Paul Vriens <Paul.Vriens.Wine at gmail.com>
Date:   Tue Nov 25 16:45:12 2008 +0100

rsaenh/tests: Use a 40-bit session key instead of 56-bit.

---

 dlls/rsaenh/tests/rsaenh.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/dlls/rsaenh/tests/rsaenh.c b/dlls/rsaenh/tests/rsaenh.c
index 9ef443c..1bb4ad2 100644
--- a/dlls/rsaenh/tests/rsaenh.c
+++ b/dlls/rsaenh/tests/rsaenh.c
@@ -736,9 +736,9 @@ static void test_aes(int keylen)
 
 static void test_rc2(void)
 {
-    static const BYTE rc2encrypted[16] = { 
-        0x02, 0x34, 0x7d, 0xf6, 0x1d, 0xc5, 0x9b, 0x8b, 
-        0x2e, 0x0d, 0x63, 0x80, 0x72, 0xc1, 0xc2, 0xb1 };
+    static const BYTE rc2_40_encrypted[16] = {
+        0xc0, 0x9a, 0xe4, 0x2f, 0x0a, 0x47, 0x67, 0x11,
+        0xfb, 0x18, 0x87, 0xce, 0x0c, 0x75, 0x07, 0xb1 };
     static const BYTE rc2_128_encrypted[] = {
         0x82,0x81,0xf7,0xff,0xdd,0xd7,0x88,0x8c,0x2a,0x2a,0xc0,0xce,0x4c,0x89,
         0xb6,0x66 };
@@ -766,7 +766,7 @@ static void test_rc2(void)
         result = CryptGetHashParam(hHash, HP_HASHVAL, pbHashValue, &dwLen, 0);
         ok(result, "%08x\n", GetLastError());
 
-        result = CryptDeriveKey(hProv, CALG_RC2, hHash, 56 << 16, &hKey);
+        result = CryptDeriveKey(hProv, CALG_RC2, hHash, 40 << 16, &hKey);
         ok(result, "%08x\n", GetLastError());
 
         dwLen = sizeof(DWORD);
@@ -811,7 +811,7 @@ static void test_rc2(void)
         result = CryptEncrypt(hKey, 0, TRUE, 0, pbData, &dwDataLen, 24);
         ok(result, "%08x\n", GetLastError());
 
-        ok(!memcmp(pbData, rc2encrypted, 8), "RC2 encryption failed!\n");
+        ok(!memcmp(pbData, rc2_40_encrypted, 16), "RC2 encryption failed!\n");
 
         result = CryptGetKeyParam(hKey, KP_IV, NULL, &dwLen, 0);
         ok(result, "%08x\n", GetLastError());




More information about the wine-cvs mailing list