Skip to content

libsodium.PKI.EncryptionKey.Constructor

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

Method Signatures

 Sub Constructor(PasswordData As libsodium.Password, Optional Salt As MemoryBlock, Limits As libsodium.ResourceLimits = libsodium.ResourceLimits.Interactive, HashAlgorithm As Int32 = libsodium.Password.ALG_ARGON2)
 Sub Constructor(FromSigningKey As libsodium.PKI.SigningKey)
 Sub Constructor(StreamData As libsodium.KeyStream, Optional Nonce As MemoryBlock)

Parameters

Constructor(libsodium.Password, MemoryBlock, libsodium.ResourceLimits, Int32)

Name Type Comment
PasswordData Password The password from which to derive a keypair.
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.

Constructor(libsodium.PKI.SigningKey)

Name Type Comment
FromSigningKey SigningKey An Ed25519 signing key pair to convert into a curve25519 encryption key pair.

Constructor(libsodium.KeyStream, MemoryBlock)

Name Type Comment
StreamData KeyStream The key stream from which to derive a keypair.
Nonce MemoryBlock Optional. A random nonce for the key derivation algorithm.

Remarks

Generates a key pair by deriving it from a Password or KeyStream, or by converting an existing SigningKey.

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

See also

Clone this wiki locally