libsodium.PKI.EncryptionKey.Constructor
Andrew Lambert edited this page Nov 26, 2022
·
11 revisions
libsodium.PKI.EncryptionKey.Constructor
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)
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 . |
Name | Type | Comment |
---|---|---|
FromSigningKey | SigningKey | An Ed25519 signing key pair to convert into a curve25519 encryption key pair. |
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. |
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.
- ed25519 to curve25519 conversion in the libsodium documentation.
Wiki home | Project page | Bugs
Text and code examples are Copyright ©2016-23 Andrew Lambert, offered under the CC BY-SA 3.0 License.