-
-
Notifications
You must be signed in to change notification settings - Fork 3
libsodium.GenericHashDigest
Andrew Lambert edited this page Nov 26, 2022
·
13 revisions
libsodium.GenericHashDigest
Protected Class GenericHashDigest
This class computes a fixed-length fingerprint for an arbitrarily long message. Usage is similar to the built-in MD5Digest class but uses the much faster and more secure BLAKE2b algorithm. You may optionally use a secret key when hashing the data (i.e. HMAC).
This class also supports keyed and un-keyed SHA256 and SHA512 digestion.
This class is not suitable for password hashing or password-based key derivation. Use the Password class instead.
This example computes the SHA512 hash of the string Hello, world!
.
Dim digest As New libsodium.GenericHashDigest(libsodium.HashType.SHA512)
digest.Process("Hello, ")
digest.Process("world!")
Dim hash As String = digest.Value
- GenericHash method
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