From 0fe0561bed211819e940083170f981c319aba878 Mon Sep 17 00:00:00 2001 From: Smith Date: Sat, 2 Jul 2022 06:06:21 +0200 Subject: [PATCH] misc. refactor --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 5cf4bd0..4197ec1 100644 --- a/index.html +++ b/index.html @@ -773,7 +773,7 @@ let hash; if (crypto.subtle) { const buff = await crypto.subtle.digest('SHA-512', new TextEncoder('utf-8').encode(salt + valid + secret)); - hash = Array.prototype.map.call(new Uint8Array(buff), x => (('00' + x.toString(16)).slice(-2))).join(''); + hash = Array.from(new Uint8Array(buff)).map(x => ('00' + x.toString(16)).slice(-2)).join(''); } else { const md = forge.md.sha512.create(); md.update(salt + valid + secret);