-
-
Notifications
You must be signed in to change notification settings - Fork 3
libsodium.ShortHash
Andrew Lambert edited this page Nov 26, 2022
·
5 revisions
libsodium.ShortHash
Protected Function ShortHash(InputData As MemoryBlock, Key As MemoryBlock) As UInt64
Name | Type | Comment |
---|---|---|
InputData | MemoryBlock | The data to be hashed. |
Key | MemoryBlock | Optional. The key for keyed hashing. |
The hash value, or 0
on error.
This method outputs short but unpredictable (without knowing the secret key) values suitable for tasks like hash tables, bloom filters, and integrity checking in interactive protocols; this method is optimized for short inputs.
The output of this method is only 64 bits. Therefore, it should not be considered collision-resistant.
- GenericHash
- SHA512
- SHA256
- Short input hashing in the libsodium documentation.
- SipHash 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.