libsodium.PKI.EncryptionKey.Derive
Andrew Lambert edited this page Nov 26, 2022
·
5 revisions
libsodium.PKI.EncryptionKey.Derive
Shared Function Derive(PrivateKeyData As MemoryBlock) As libsodium.PKI.EncryptionKey
Name | Type | Comment |
---|---|---|
PrivateKeyData | MemoryBlock | The user's private key (exactly crypto_scalarmult_BYTES long). |
An instance of EncryptionKey containing the derived key pair, or Nil
on error.
Given a user's private key, this method derives an EncryptionKey
pair. The PrivateKeyData
is assumed to be high-entropy and is used directly as the private key. As such DO NOT use this method to derive a key pair from low-entropy data like a password: use EncryptionKey.Constructor(Password) instead.
Wiki home | Project page | Bugs
Text and code examples are Copyright ©2016-23 Andrew Lambert, offered under the CC BY-SA 3.0 License.