diff options
| author | Adam Soltys <[email protected]> | 2026-02-27 14:46:27 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-02-27 14:46:27 -0800 |
| commit | 8ffcf769052461e03a2c69220392cb37a623f3f4 (patch) | |
| tree | 5b0b16269a729fbe9db44c65b3a0da3d95c11b78 /src/lib/deriveAuthKey.ts | |
| parent | 6ba952f16fc60fc56f0834e5b1d08671885618c5 (diff) | |
| download | coinos-ui-8ffcf769052461e03a2c69220392cb37a623f3f4.tar.gz coinos-ui-8ffcf769052461e03a2c69220392cb37a623f3f4.zip | |
2 step register
Diffstat (limited to 'src/lib/deriveAuthKey.ts')
| -rw-r--r-- | src/lib/deriveAuthKey.ts | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/lib/deriveAuthKey.ts b/src/lib/deriveAuthKey.ts index 9215b515..eb498e0a 100644 --- a/src/lib/deriveAuthKey.ts +++ b/src/lib/deriveAuthKey.ts @@ -1,7 +1,6 @@ import { scryptAsync } from "@noble/hashes/scrypt.js"; import { bytesToHex } from "@noble/hashes/utils.js"; import { getPublicKey } from "nostr-tools"; -import { rememberPrfKey, defaultRememberForMs } from "$lib/passwordCache"; export async function deriveAuthKeypair(username: string, password: string) { const salt = `coinos:auth:${username.toLowerCase().replace(/\s/g, "")}`; @@ -17,7 +16,5 @@ export async function deriveWalletEntropy(sk: Uint8Array): Promise<ArrayBuffer> const sigBytes = new Uint8Array(signed.sig.length / 2); for (let i = 0; i < signed.sig.length; i += 2) sigBytes[i / 2] = parseInt(signed.sig.slice(i, i + 2), 16); - const entropy = await crypto.subtle.digest("SHA-256", sigBytes); - rememberPrfKey(entropy, defaultRememberForMs); - return entropy; + return crypto.subtle.digest("SHA-256", sigBytes); } |
