From 524fcd3135431c1b7fad78964129e07a1f450b53 Mon Sep 17 00:00:00 2001 From: Nishant Das Patnaik Date: Tue, 6 Feb 2018 08:33:45 +0530 Subject: [PATCH] removed all toString() in favor of JSON.stringify --- scripts/Android/Crypto/Cipher.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/Android/Crypto/Cipher.js b/scripts/Android/Crypto/Cipher.js index 2ac0b3e..875679d 100644 --- a/scripts/Android/Crypto/Cipher.js +++ b/scripts/Android/Crypto/Cipher.js @@ -24,7 +24,7 @@ var byteArraytoHexString = function(byteArray) { return ('0' + (byte & 0xFF).toString(16)).slice(-2); }).join('') } else { - return byteArray + ""; + return JSON.stringify(byteArray); } } @@ -42,7 +42,7 @@ var normalizeInput = function(input) { } else if (input.length && input.length > 0) { var normalized = byteArraytoHexString(input); } else { - var normalized = input.toString(); + var normalized = JSON.stringify(input); } return normalized; }