From 8c7a464fc890e93c76aa0f017ef7f7b03496901f Mon Sep 17 00:00:00 2001 From: Tankred Hase Date: Thu, 4 Apr 2013 18:39:22 +0200 Subject: [PATCH] bugfix util --- src/js/crypto/util.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/crypto/util.js b/src/js/crypto/util.js index 7791ac2..645017f 100644 --- a/src/js/crypto/util.js +++ b/src/js/crypto/util.js @@ -142,7 +142,7 @@ app.crypto.Util = function(window, uuid) { var b = new Uint8Array(buf); var str = ''; - for (var i = 0; i < b.byteLength; i++) { + for (var i = 0; i < b.length; i++) { str += String.fromCharCode(b[i]); } @@ -157,7 +157,7 @@ app.crypto.Util = function(window, uuid) { this.uint8Arr2BinStr = function(buf) { var str = ''; - for (var i = 0; i < buf.byteLength; i++) { + for (var i = 0; i < buf.length; i++) { str += String.fromCharCode(buf[i]); }