chore: update to version 14.0.11 and align website URLs

This commit is contained in:
2026-01-11 11:34:13 +03:00
parent ef74383349
commit 19c8d69bd8
1499 changed files with 53633 additions and 89 deletions
+15
View File
@@ -0,0 +1,15 @@
import { scrypt as scryptJs } from '@noble/hashes/scrypt';
import { hasBigInt, objectSpread, u8aToU8a } from '@pezkuwi/util';
import { isReady, scrypt } from '@pezkuwi/wasm-crypto';
import { randomAsU8a } from '../random/asU8a.js';
import { DEFAULT_PARAMS } from './defaults.js';
export function scryptEncode(passphrase, salt = randomAsU8a(), params = DEFAULT_PARAMS, onlyJs) {
const u8a = u8aToU8a(passphrase);
return {
params,
password: !hasBigInt || (!onlyJs && isReady())
? scrypt(u8a, salt, Math.log2(params.N), params.r, params.p)
: scryptJs(u8a, salt, objectSpread({ dkLen: 64 }, params)),
salt
};
}