From 44c8683924c8d09c32c19fa1375915e17041729c Mon Sep 17 00:00:00 2001 From: Roman Shtylman Date: Sun, 17 Feb 2013 01:12:59 -0500 Subject: [PATCH] fix sha256 hex conversion --- src/crypto-js/sha256.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/crypto-js/sha256.js b/src/crypto-js/sha256.js index aa850c3..1ce1790 100644 --- a/src/crypto-js/sha256.js +++ b/src/crypto-js/sha256.js @@ -5,6 +5,8 @@ * http://code.google.com/p/crypto-js/wiki/License */ +var conv = require('../convert'); + // Convert a byte array to big-endian 32-bit words var bytesToWords = function (bytes) { for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8) @@ -51,7 +53,7 @@ var SHA256 = C.SHA256 = function (message, options) { var digestbytes = wordsToBytes(SHA256._sha256(message)); return options && options.asBytes ? digestbytes : options && options.asString ? Binary.bytesToString(digestbytes) : - util.bytesToHex(digestbytes); + conv.bytesToHex(digestbytes); }; // The core