We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent da47694 commit 0adec88Copy full SHA for 0adec88
crypto-polyfills.js
@@ -9,7 +9,7 @@ String.prototype.hexDecode = function() { return this.match(/../g).map(function(
9
String.prototype.hexEncode = function() { return this.toByteArray().hexEncode() }
10
11
String.prototype.toByte = function() { return this.charCodeAt(0) }
12
-String.prototype.toByteArray = function() { return this.match(/[\s\S]/g).map(function(c){ return c.toByte() }) }
+String.prototype.toByteArray = function() { return this.split('').map(function(c){ return c.toByte() }) }
13
14
Array.prototype.asString = function() { return String.fromCharCode.apply(null, this) }
15
Array.prototype.hexEncode = function() { return this.map(function(x) { return x.toHex() }).join("") }
0 commit comments