From 939ab4786c3445157f963c29a6ad6220cc8409e5 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Wed, 8 Apr 2015 20:29:56 +0300 Subject: [PATCH] Supported two-step login on mobile Fixed sha256 in crypto.js --- app/js/lib/bin_utils.js | 6 +-- app/partials/mobile/login.html | 27 +++++++++- .../mobile/password_recovery_modal.html | 49 +++++++++++++++++++ 3 files changed, 78 insertions(+), 4 deletions(-) create mode 100644 app/partials/mobile/password_recovery_modal.html diff --git a/app/js/lib/bin_utils.js b/app/js/lib/bin_utils.js index 775a3fd5..404350eb 100644 --- a/app/js/lib/bin_utils.js +++ b/app/js/lib/bin_utils.js @@ -318,9 +318,9 @@ function sha1BytesSync (bytes) { } function sha256HashSync (bytes) { - console.log(dT(), 'SHA-2 hash start', bytes.byteLength || bytes.length); - var hashWords = CryptoJS.SHA256(bytes); - console.log(dT(), 'SHA-2 hash finish'); + // console.log(dT(), 'SHA-2 hash start', bytes.byteLength || bytes.length); + var hashWords = CryptoJS.SHA256(bytesToWords(bytes)); + // console.log(dT(), 'SHA-2 hash finish'); var hashBytes = bytesFromWords(hashWords); diff --git a/app/partials/mobile/login.html b/app/partials/mobile/login.html index 11965125..d57909cd 100644 --- a/app/partials/mobile/login.html +++ b/app/partials/mobile/login.html @@ -6,7 +6,7 @@