espelhamento de
https://github.com/therootcompany/keypairs.js.git
sincronizado 2024-11-16 17:29:03 +00:00
bugfix: sha2 must return Uint8Array, not ArrayBuffer
Esse commit está contido em:
pai
c66e9267aa
commit
af7ee5426f
@ -9,5 +9,7 @@ sha2.sum = function (alg, str) {
|
||||
data = encoder.encode(str);
|
||||
}
|
||||
var sha = 'SHA-' + String(alg).replace(/^sha-?/i, '');
|
||||
return window.crypto.subtle.digest(sha, data);
|
||||
return window.crypto.subtle.digest(sha, data).then(function (buf) {
|
||||
return new Uint8Array(buf);
|
||||
});
|
||||
};
|
||||
|
Carregando…
x
Referência em uma nova issue
Block a user