Skip to content

Commit

Permalink
fixed some documentation mixed up about Secret sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyan4973 committed Mar 3, 2024
1 parent 1864a50 commit 474af7b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
10 changes: 7 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ tests/sanity_test
tests/sanity_test_vectors_generator
fuzzer

# local conf
.clang_complete

# Mac OS-X artefacts
*.dSYM
.DS_Store
Expand All @@ -49,6 +46,13 @@ infer-out
tmp*
tests/*.unicode
tests/unicode_test*
*.txt
*.xxhsum

# editor artifacts
.clang_complete
*.swp
.vscode/

# Doxygen
doxygen/
6 changes: 3 additions & 3 deletions xxhash.h
Original file line number Diff line number Diff line change
Expand Up @@ -1819,7 +1819,7 @@ XXH_PUBLIC_API XXH_PUREF XXH128_hash_t XXH128(XXH_NOESCAPE const void* data, siz
* @brief Derive a high-entropy secret from any user-defined content, named customSeed.
*
* @param secretBuffer A writable buffer for derived high-entropy secret data.
* @param secretSize Size of secretBuffer, in bytes. Must be >= XXH3_SECRET_DEFAULT_SIZE.
* @param secretSize Size of secretBuffer, in bytes. Must be >= XXH3_SECRET_SIZE_MIN.
* @param customSeed A user-defined content.
* @param customSeedSize Size of customSeed, in bytes.
*
Expand Down Expand Up @@ -1878,7 +1878,7 @@ XXH_PUBLIC_API XXH_errorcode XXH3_generateSecret(XXH_NOESCAPE void* secretBuffer
/*!
* @brief Generate the same secret as the _withSeed() variants.
*
* @param secretBuffer A writable buffer of @ref XXH3_SECRET_SIZE_MIN bytes
* @param secretBuffer A writable buffer of @ref XXH3_SECRET_DEFAULT_SIZE bytes
* @param seed The 64-bit seed to alter the hash result predictably.
*
* The generated secret can be used in combination with
Expand All @@ -1900,7 +1900,7 @@ XXH_PUBLIC_API XXH_errorcode XXH3_generateSecret(XXH_NOESCAPE void* secretBuffer
* };
* // Fast, caches the seeded secret for future uses.
* class HashFast {
* unsigned char secret[XXH3_SECRET_SIZE_MIN];
* unsigned char secret[XXH3_SECRET_DEFAULT_SIZE];
* public:
* HashFast(XXH64_hash_t s) {
* XXH3_generateSecret_fromSeed(secret, seed);
Expand Down

0 comments on commit 474af7b

Please sign in to comment.