Skip to content

Commit

Permalink
removed all toString() in favor of JSON.stringify
Browse files Browse the repository at this point in the history
  • Loading branch information
dpnishant committed Feb 6, 2018
1 parent 6ca5db9 commit 524fcd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/Android/Crypto/Cipher.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var byteArraytoHexString = function(byteArray) {
return ('0' + (byte & 0xFF).toString(16)).slice(-2);
}).join('')
} else {
return byteArray + "";
return JSON.stringify(byteArray);
}
}

Expand All @@ -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;
}
Expand Down

0 comments on commit 524fcd3

Please sign in to comment.