Pbkdf2

scalus.crypto.Pbkdf2
object Pbkdf2

Pure Scala implementation of PBKDF2 (Password-Based Key Derivation Function 2).

Implementation follows RFC 8018. Uses HMAC-SHA512 as the pseudorandom function (PRF).

Attributes

See also
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Pbkdf2.type

Members list

Value members

Concrete methods

def deriveKey(password: Array[Byte], salt: Array[Byte], iterations: Int, keyLength: Int): Array[Byte]

Derive a key using PBKDF2 with HMAC-SHA512.

Derive a key using PBKDF2 with HMAC-SHA512.

Value parameters

iterations

number of iterations (2048 for BIP-39)

keyLength

desired output key length in bytes (64 for BIP-39)

password

the password bytes

salt

the salt bytes

Attributes

Returns

derived key