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), or if any of the iteration count, the key length, or the password or salt length is larger than OpenSSL's int can hold.

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

Constructors

create

[Source]

new val create()
: Pbkdf2Sha256 val^

Returns


Public Functions

apply

[Source]

fun box apply(
  password: ByteSeq,
  salt: ByteSeq,
  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