(digest)
| 56 | const setStatus = (msg) => { $("status").textContent = msg; }; |
| 57 | |
| 58 | async function hex(digest) { |
| 59 | return Array.from(new Uint8Array(digest), (b) => b.toString(16).padStart(2, "0")).join(""); |
| 60 | } |
| 61 | |
| 62 | async function sha256Hex(bytes) { |
| 63 | return hex(await crypto.subtle.digest("SHA-256", bytes)); |