Skip to content

fix(hmac): validate pointers in get_hmac - #20

Merged
LimiNode merged 1 commit into
mainfrom
codex/validate-pointers-in-get_hmac-function
Sep 3, 2025
Merged

fix(hmac): validate pointers in get_hmac#20
LimiNode merged 1 commit into
mainfrom
codex/validate-pointers-in-get_hmac-function

Conversation

@LimiNode

@LimiNode LimiNode commented Sep 3, 2025

Copy link
Copy Markdown
Owner

Summary

  • validate that get_hmac receives non-null pointers when lengths are non-zero
  • document pointer requirements and exceptions
  • test null pointer handling

Testing

  • g++ -std=c++17 test_all.cpp hmac.cpp hmac_utils.cpp sha1.cpp sha256.cpp sha512.cpp -lgtest -lgtest_main -pthread -o test_all
  • ./test_all

https://chatgpt.com/codex/tasks/task_e_68b8b3d73618832c8f3d99fc79f4726f

Throw std::invalid_argument when key or message pointers are null with non-zero lengths.
Update header documentation and cover invalid inputs with tests.
@LimiNode
LimiNode merged commit 9101540 into main Sep 3, 2025
4 checks passed
@LimiNode
LimiNode deleted the codex/validate-pointers-in-get_hmac-function branch September 4, 2025 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant