Skip to content

libsodium.Password.DeriveKey

Andrew Lambert edited this page Nov 26, 2022 · 13 revisions

libsodium.Password.DeriveKey

Method Signature

 Function DeriveKey(KeyLength As Int32, Salt As MemoryBlock, Limits As libsodium.ResourceLimits, HashAlgorithm As Int32 = libsodium.Password.ALG_ARGON2) As MemoryBlock

Parameters

Name Type Comment
KeyLength Int32 The length, in bytes, of the requested key.
Salt MemoryBlock A random salt for the key derivation algorithm.
Limits ResourceLimits A member of the ResourceLimits enumeration.
HashAlgorithm Int32 Optional. Either ALG_ARGON2 (default) or ALG_SCRYPT.

Return value

Unpredictable bytes suitable to be used as a cryptographic key of the requested length.

Remarks

Computes a key of the specified KeySize using the Password, Salt, Limits, and HashAlgorithm.

See also

Clone this wiki locally