Skip to content

Commit 0adec88

Browse files
committed
Update crypto-polyfills.js
1 parent da47694 commit 0adec88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crypto-polyfills.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ String.prototype.hexDecode = function() { return this.match(/../g).map(function(
99
String.prototype.hexEncode = function() { return this.toByteArray().hexEncode() }
1010

1111
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() }) }
12+
String.prototype.toByteArray = function() { return this.split('').map(function(c){ return c.toByte() }) }
1313

1414
Array.prototype.asString = function() { return String.fromCharCode.apply(null, this) }
1515
Array.prototype.hexEncode = function() { return this.map(function(x) { return x.toHex() }).join("") }

0 commit comments

Comments
 (0)