From 3e12c7eae6351bf0ed504552e3aa0df355746177 Mon Sep 17 00:00:00 2001 From: Tankred Hase Date: Tue, 14 May 2013 13:43:52 +0200 Subject: [PATCH] inject forge as dependency --- src/js/crypto/aes-cbc.js | 2 +- test/unit/aes-test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/crypto/aes-cbc.js b/src/js/crypto/aes-cbc.js index 6491616..7d109e8 100644 --- a/src/js/crypto/aes-cbc.js +++ b/src/js/crypto/aes-cbc.js @@ -1,7 +1,7 @@ /** * A Wrapper for Forge's AES-CBC encryption */ -app.crypto.AesCBC = function() { +app.crypto.AesCBC = function(forge) { 'use strict'; /** diff --git a/test/unit/aes-test.js b/test/unit/aes-test.js index 69dfd99..cc21cae 100644 --- a/test/unit/aes-test.js +++ b/test/unit/aes-test.js @@ -13,7 +13,7 @@ test("Init", 1, function() { }); test("CBC mode", 4, function() { - var aes = new app.crypto.AesCBC(); + var aes = new app.crypto.AesCBC(forge); var plaintext = aes_test.test_message; var key = aes_test.util.random(aes_test.keySize);