From 04376d0245256406ff8d9615a3d827c3a8e580e8 Mon Sep 17 00:00:00 2001 From: Tankred Hase Date: Tue, 14 May 2013 02:07:28 +0200 Subject: [PATCH] fixed forge test --- test/unit/forge-test.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/unit/forge-test.js b/test/unit/forge-test.js index fc9573d..9fa6d50 100644 --- a/test/unit/forge-test.js +++ b/test/unit/forge-test.js @@ -5,6 +5,11 @@ var rsa_test = { test_message: '06a9214036b8a15b512e03d534120006' }; +var forge_aes_test = { + keySize: 128, + test_message: new TestData().generateBigString(1000) +}; + asyncTest("Generate RSA Keypair", 1, function() { forge.rsa.generateKeyPair({ @@ -32,7 +37,7 @@ test("RSA Decrypt", 1, function() { test("SHA-256 Hash", 1, function() { rsa_test.md = forge.md.sha256.create(); - rsa_test.md.update(rsa_test.ct); + rsa_test.md.update(forge_aes_test.test_message); var digest = rsa_test.md.digest().data; ok(digest); }); @@ -47,11 +52,6 @@ test("RSA Verify", 1, function() { ok(res); }); -var forge_aes_test = { - keySize: 128, - test_message: new TestData().generateBigString(1000) -}; - test("HMAC SHA-256", 1, function() { var util = new app.crypto.Util(window, uuid);