Skip to content

Commit acbaf4a

Browse files
dsmurrowgithub-actions[bot]Panquesito7
authored
feat: implemented BLAKE2b cryptographic hashing algorithm (#1230)
* feat: added BLAKE2b with one working assert docs: added BLAKE2b to README.md * [enhancement] added more doc comments and fully implemented BLAKE2b key hashing * fix: forgot to add arg * chore: applied clang-format * updating DIRECTORY.md * docs: added main function docs Co-authored-by: David Leal <[email protected]> * docs: removed @file qualifier Co-authored-by: David Leal <[email protected]> * docs: added doc comment for assert_bytes() Co-authored-by: David Leal <[email protected]> * docs: added documentation for #include's As requested by Panquesito27 in #1230 (comment) * docs: added algorithm description As requested in #1230 (comment) * docs: added reasoning for warning suppression pragmas * docs: spellcheck and additions Added doc for bb definition. Added description for mixing function G and compression function F. * Added print statement to let user know tests have passed Co-authored-by: David Leal <[email protected]> * Updated doc comments for variables * docs: removed old doc comments * fix: had minus sign instead of assignment operator * chore: replaced uint64_t[16] with block_t type to improve readability * docs: defined macro constants to reduce magic numbers * fix: fixed memory leak in blake2b() * docs: moved comment Moved comment about the suppressed warning directly above the code that emits the warning * docs: added psuedocode/feat: added u128 Added psuedocode for the algorithm in doc comment for BLAKE2B(). Added return docs for void functions. Defined an unsigned 128-bit integer to match the max input size specified for the algorithm. * fix: fixed build errors * docs: added some clarifying comments * docs: reduced magic numbers --------- Co-authored-by: github-actions[bot] <[email protected]> Co-authored-by: David Leal <[email protected]>
1 parent 6235949 commit acbaf4a

File tree

3 files changed

+483
-0
lines changed

3 files changed

+483
-0
lines changed

DIRECTORY.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@
161161

162162
## Hash
163163
* [Hash Adler32](https://github.com/TheAlgorithms/C/blob/HEAD/hash/hash_adler32.c)
164+
* [Hash Blake2B](https://github.com/TheAlgorithms/C/blob/HEAD/hash/hash_blake2b.c)
164165
* [Hash Crc32](https://github.com/TheAlgorithms/C/blob/HEAD/hash/hash_crc32.c)
165166
* [Hash Djb2](https://github.com/TheAlgorithms/C/blob/HEAD/hash/hash_djb2.c)
166167
* [Hash Sdbm](https://github.com/TheAlgorithms/C/blob/HEAD/hash/hash_sdbm.c)
@@ -215,6 +216,7 @@
215216
* [1833](https://github.com/TheAlgorithms/C/blob/HEAD/leetcode/src/1833.c)
216217
* [1838](https://github.com/TheAlgorithms/C/blob/HEAD/leetcode/src/1838.c)
217218
* [189](https://github.com/TheAlgorithms/C/blob/HEAD/leetcode/src/189.c)
219+
* [19](https://github.com/TheAlgorithms/C/blob/HEAD/leetcode/src/19.c)
218220
* [190](https://github.com/TheAlgorithms/C/blob/HEAD/leetcode/src/190.c)
219221
* [191](https://github.com/TheAlgorithms/C/blob/HEAD/leetcode/src/191.c)
220222
* [2](https://github.com/TheAlgorithms/C/blob/HEAD/leetcode/src/2.c)

hash/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
* xor8 (8 bit)
66
* adler_32 (32 bit)
77
* crc32 (32 bit)
8+
* BLAKE2b

0 commit comments

Comments
 (0)