Skip to content

deriveArgon2 ​

deriveArgon2 ​

Derives raw Argon2 bytes after validating parameters and resource ceilings.

The default native WebCrypto adapter implements version 0x13. Runtime support is detected by the import/derive operations, without an extra trial derivation. Supply an explicit backend for other environments or version 0x10. There is no fallback between variants, versions, or implementations.

Caller buffers are copied synchronously before the first await and never modified. Owned temporary arrays are zeroed on completion. Native key storage and runtime copies cannot be explicitly erased by JavaScript. The returned output is caller-owned. Calls cannot cancel native work once dispatched. Limits apply per call, not to concurrent invocations.

ts
function deriveArgon2(
	input: Argon2Input,
	options: Argon2Options,
): Promise<Argon2Result>

Parameters

Released under the MIT License.