Skip to content

libsodium.SKI.SecretKey.Constructor

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

libsodium.SKI.SecretKey.Constructor

Method Signature

Sub Constructor(FromPassword As libsodium.Password, Optional Salt As MemoryBlock, Limits As libsodium.ResourceLimits = libsodium.ResourceLimits.Interactive, HashAlgorithm As Int32 = libsodium.Password.ALG_ARGON2)

Parameters

Name Type Comment
FromPassword Password The password from which to derive a secret key.
Salt MemoryBlock Optional. A random salt for the key derivation algorithm.
Limits ResourceLimits Optional. A member of the ResourceLimits enumeration.
HashAlgorithm Int32 Optional. Either ALG_ARGON2 (default) or ALG_SCRYPT.

Remarks

Generates a SecretKey by deriving it from a password.

If libsodium is not available at runtime, a PlatformNotSupportedException will be raised.

Clone this wiki locally