webcrypto utf8 encoding fix
This commit is contained in:
@@ -90,6 +90,7 @@ class SNCryptoWeb extends SNCrypto {
|
|||||||
|
|
||||||
stringToArrayBuffer(string) {
|
stringToArrayBuffer(string) {
|
||||||
// not available on Edge/IE
|
// not available on Edge/IE
|
||||||
|
|
||||||
if(window.TextEncoder) {
|
if(window.TextEncoder) {
|
||||||
var encoder = new TextEncoder("utf-8");
|
var encoder = new TextEncoder("utf-8");
|
||||||
var result = encoder.encode(string);
|
var result = encoder.encode(string);
|
||||||
|
|||||||
Reference in New Issue
Block a user