Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed some documentation mixed up about Secret sizes #923

Merged
merged 1 commit into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading