Protected Page

Incorrect password. Please try again.
async function checkPassword(input) { const encoder = new TextEncoder(); const data = encoder.encode(input); const hash = await crypto.subtle.digest("SHA-256", data); const hashArray = Array.from(new Uint8Array(hash)); const hashHex = hashArray.map(byte => byte.toString(16).padStart(2, '0')).join(''); const validHashes = { "0a953f896bd8d70c9b7f234747f13f0cdf455f04c27d549ced8ef6130346b261": "/the-core", // Precomputed hash "a0e6db2b224d1f0349a98eebe7f508db2cc58d99222aa97bae18f0cd6c3c6d04": "/blog" }; if (validHashes[hashHex]) { window.location.href = validHashes[hashHex]; } else { alert("Wrong password!"); } }