Skip to content

Pbkdf2Sha256

[Source]

Derive a key from a password using PBKDF2 with HMAC-SHA-256 as the PRF, as defined in RFC 2898.

Returns a key of the requested length, or raises an error if the derivation fails (e.g., zero iterations).

Supported on OpenSSL 1.1.x, OpenSSL 3.0.x, and LibreSSL.

let key = Pbkdf2Sha256("password", "salt", 4096, 32)?
primitive val Pbkdf2Sha256

Constructors

create

[Source]

new val create()
: Pbkdf2Sha256 val^

Returns


Public Functions

apply

[Source]

fun tag apply(
  password: (String val | Array[U8 val] val),
  salt: (String val | Array[U8 val] val),
  iterations: U32 val,
  key_length: USize val)
: Array[U8 val] val ?

Parameters

Returns


eq

[Source]

fun box eq(
  that: Pbkdf2Sha256 val)
: Bool val

Parameters

Returns


ne

[Source]

fun box ne(
  that: Pbkdf2Sha256 val)
: Bool val

Parameters

Returns