Initial Commit
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user