aboutsummaryrefslogtreecommitdiff
path: root/core/crypto/hash/hash.odin
Commit message (Collapse)AuthorAgeFilesLines
* Remove `core:mem` import from `core:crypto`.Jeroen van Rijn3 days1-2/+2
|
* Change Odin's LICENSE to zlib from BSD 3-clausegingerBill2025-10-281-1/+1
| | | | This change was made in order to allow things produced with Odin and using Odin's core library, to not require the LICENSE to also be distributed alongside the binary form.
* crypto/hash: hash_bytes_to_buffer slice result to digest sizeLaytan2025-07-191-3/+2
|
* Move os stuff to OS specific filesgingerBill2024-09-191-38/+4
|
* core/crypto/hash: Make the `_to_buffer` routines return the hash sliceYawning Angel2024-08-101-5/+11
| | | | Quality of life improvement.
* core/crypto: Stop using context.temp_allocatorYawning Angel2024-02-071-8/+4
| | | | | | | | | | | The max digest size for the foreseeable future will be 512 bits, and the max block size is currently 1152 bits (SHA3-224). If people add more exotic hash algorithms without bumping the constants when required, tests will fail. The stream buffer will currently be 576 bytes, which is "fine" to just stick on the stack, and is a sensible multiple of the more common block size of 64 bytes.
* core/crypto/hash: Make the low level interface allocator-lessYawning Angel2024-02-071-2/+2
| | | | Just (ab)using reflect to victory is probably fine.
* core/crypto: Expose the block sizes for every hash algorithmYawning Angel2024-02-071-5/+7
| | | | | While I just went and made this private, this information is required for keying HMAC.
* core:crypto/hash: Add a generic higher level hash interfaceYawning Angel2024-02-071-0/+118
There is a lot of code duplicated in convenience methods in each hash implementation, and having a generic hash type makes implementing higher-level constructs such as HMAC significantly easier down the road.