-
-
Notifications
You must be signed in to change notification settings - Fork 3
libsodium.KeyStream.Constructor
Andrew Lambert edited this page Jan 21, 2023
·
10 revisions
Sub Constructor(NewStreamType As libsodium.StreamType = libsodium.StreamType.XSalsa20)
Sub Constructor(FromPassword As libsodium.Password, Optional Salt As MemoryBlock, Limits As libsodium.ResourceLimits = libsodium.ResourceLimits.Interactive, HashAlgorithm As Int32 = libsodium.Password.ALG_ARGON2, NewStreamType As libsodium.StreamType = libsodium.StreamType.XSalsa20)
Sub Constructor(KeyData As libsodium.PKI.PublicKey, NewStreamType As libsodium.StreamType = libsodium.StreamType.XSalsa20)
Name | Type | Comment |
---|---|---|
NewStreamType | StreamType | Optional. The cipher to use. If not specified then XSalsa20 is used. |
Name | Type | Comment |
---|---|---|
FromPassword | Password | The password from which to derive a key. |
Salt | MemoryBlock | Optional. A random salt for the key derivation algorithm. |
Limits | ResourceLimits | Optional. A member of the ResourceLimits enumeration. |
HashAlgorithm | Int32 | Optional. The key derivation algorithm to use (ALG_ARGON2 or ALG_SCRYPT). |
NewStreamType | StreamType | Optional. The cipher to use. If not specified then XSalsa20 is used. |
Name | Type | Comment |
---|---|---|
KeyData | PublicKey | The public half of an encryption or signing key pair to use as the key. |
NewStreamType | StreamType | Optional. The cipher to use. If not specified then XSalsa20 is used. |
Generates a new random key stream, or derives one from a password or from the public half of a key pair.
If libsodium is not available at runtime, a PlatformNotSupportedException
will be raised.
Wiki home | Project page | Bugs | Become a sponsor
Text and code examples are Copyright ©2016-24 Andrew Lambert, offered under the CC BY-SA 3.0 License.
- libsodium module
- FAQ
-
Examples
- Secure memory
- Password hashing
- Generic hashing
- Encrypting streams or files
- PKI
- Encryption
- Digital signatures
- SKI
- Encryption
- Message authentication