Skip to content

Argon2Input ​

Argon2Input ​

Exact derivation inputs. Password encoding and format preprocessing belong to the caller.

ts
interface Argon2Input {
	readonly algorithm: Argon2Algorithm;
	readonly version: Argon2Version;
	readonly password: Uint8Array;
	readonly salt: Uint8Array;
	readonly memoryKiB: number;
	readonly passes: number;
	readonly parallelism: number;
	readonly outputBytes: number;
	readonly secret?: Uint8Array;
	readonly associatedData?: Uint8Array;
}

Properties

  • readonly algorithm: Argon2Algorithm — Select Argon2id for new applications.
  • readonly version: Argon2Version — Exact version. No version substitution is performed.
  • readonly password: Uint8Array — Password or format-preprocessed input bytes.
  • readonly salt: Uint8Array — Salt bytes. The native backend requires at least eight bytes.
  • readonly memoryKiB: number — Total memory in kibibytes, at least eight times parallelism.
  • readonly passes: number — Number of full passes through memory.
  • readonly parallelism: number — Number of lanes.
  • readonly outputBytes: number — Requested output length in bytes, at least four.
  • readonly secret?: Uint8Array — Optional secret input, separate from the password.
  • readonly associatedData?: Uint8Array — Optional associated data included in the derivation.

Released under the MIT License.