-
-
Notifications
You must be signed in to change notification settings - Fork 3
libsodium.Password.DeriveKey
Andrew Lambert edited this page Nov 26, 2022
·
13 revisions
Function DeriveKey(KeyLength As Int32, Salt As MemoryBlock, Limits As libsodium.ResourceLimits, HashAlgorithm As Int32 = libsodium.Password.ALG_ARGON2) As MemoryBlock
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 . |
Unpredictable bytes suitable to be used as a cryptographic key of the requested length.
Computes a key of the specified KeySize
using the Password
, Salt
, Limits
, and HashAlgorithm
.
- PBKDF2 on Wikipedia
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