From 1f7a503fb1ad7df7d8537ced1e3fe8fa7be3a53f Mon Sep 17 00:00:00 2001 From: Tankred Hase Date: Fri, 6 Apr 2012 19:42:44 +0800 Subject: [PATCH] refactored sha.js internally with module pattern so that it does not require a reference to the window object... external api stays the same --- src/ciphers/hash/sha.js | 6 +++--- test/index.html | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ciphers/hash/sha.js b/src/ciphers/hash/sha.js index fd37fbb8..8945fbcf 100644 --- a/src/ciphers/hash/sha.js +++ b/src/ciphers/hash/sha.js @@ -21,8 +21,8 @@ * - str_sha512 */ -(function () -{ +var jsSHA = (function () { + /* * Configurable variables. Defaults typically work */ @@ -1190,7 +1190,7 @@ } }; - window.jsSHA = jsSHA; + return jsSHA; }()); function str_sha1(str) { diff --git a/test/index.html b/test/index.html index 898b8093..873508a8 100644 --- a/test/index.html +++ b/test/index.html @@ -20,6 +20,7 @@ +