Skip to content

Pbes2EncryptionOptions ​

Pbes2EncryptionOptions ​

Input for encryptPbes2.

ts
interface Pbes2EncryptionOptions {
	readonly password: string;
	readonly iterations?: number;
	readonly salt?: Uint8Array;
	readonly iv?: Uint8Array;
	readonly cipher?: Pbes2EncryptionScheme;
	readonly prf?: Pbes2Prf;
}

Properties

  • readonly password: string — Password fed to PBKDF2 for key derivation.
  • readonly iterations?: number — PBKDF2 iteration count, an integer from 1 to 4294967295. Default: 100_000.
  • readonly salt?: Uint8Array — PBKDF2 salt. Default: 16 cryptographically random bytes.
  • readonly iv?: Uint8Array — AES-CBC initialization vector. Default: 16 cryptographically random bytes.
  • readonly cipher?: Pbes2EncryptionScheme — AES-CBC cipher. Default: 'AES-256-CBC'.
  • readonly prf?: Pbes2Prf — PBKDF2 PRF. Default: 'HMAC-SHA-256'.

Released under the MIT License.