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
+7
View File
@@ -0,0 +1,7 @@
interface Result {
password: Uint8Array;
rounds: number;
salt: Uint8Array;
}
export declare function pbkdf2Encode(passphrase?: string | Uint8Array, salt?: Uint8Array, rounds?: number, onlyJs?: boolean): Result;
export {};
+16
View File
@@ -0,0 +1,16 @@
import { pbkdf2 as pbkdf2Js } from '@noble/hashes/pbkdf2';
import { sha512 } from '@noble/hashes/sha512';
import { hasBigInt, u8aToU8a } from '@pezkuwi/util';
import { isReady, pbkdf2 } from '@pezkuwi/wasm-crypto';
import { randomAsU8a } from '../random/asU8a.js';
export function pbkdf2Encode(passphrase, salt = randomAsU8a(), rounds = 2048, onlyJs) {
const u8aPass = u8aToU8a(passphrase);
const u8aSalt = u8aToU8a(salt);
return {
password: !hasBigInt || (!onlyJs && isReady())
? pbkdf2(u8aPass, u8aSalt, rounds)
: pbkdf2Js(sha512, u8aPass, u8aSalt, { c: rounds, dkLen: 64 }),
rounds,
salt
};
}
+1
View File
@@ -0,0 +1 @@
export { pbkdf2Encode } from './encode.js';
+1
View File
@@ -0,0 +1 @@
export { pbkdf2Encode } from './encode.js';