Initial Commit

This commit is contained in:
2026-05-27 23:47:53 +01:00
parent fbc70f96e6
commit 9b28db724f
18103 changed files with 1600554 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
/**
* Public façade for HKDF. Routes through the primitive selector layer.
*/
import type { HashAlgorithm } from "../../hash/sha2/sha2.js";
import { hkdf as selectedHkdf } from "../../primitives/hkdf/hkdf.select/hkdf.select.js";
export interface HkdfOptions {
readonly salt: Uint8Array;
readonly info: Uint8Array;
readonly length: number;
}
/** HKDF-Extract-and-Expand over SHA-256/384/512. */
export function hkdf(
algo: HashAlgorithm,
ikm: Uint8Array,
options: HkdfOptions
): Uint8Array {
return selectedHkdf(algo, ikm, options);
}