Summary
Add known-vector and incremental-update tests for the internal SHA-256 implementation used by migration checksums.
Checksum correctness is required to reliably detect modified migration files.
Current behavior
The module includes a self-contained SHA-256 implementation with:
- reset support;
- incremental updates;
- binary updates;
- digest generation;
- hexadecimal encoding;
- the
sha256_hex() convenience function.
No automated tests currently validate the implementation.
Expected behavior
The implementation must match standard SHA-256 test vectors and produce identical results regardless of input chunking.
Scope
Suggested files
modules/db/tests/sha256_test.cpp
modules/db/src/Sha256.cpp
Acceptance criteria
Non-goals
This issue does not include:
- replacing SHA-256 with an external crypto library;
- adding other hash algorithms;
- benchmarking hash performance.
Suggested labels
scope:db
type:ci
tests
good first issue
status:ready
Summary
Add known-vector and incremental-update tests for the internal SHA-256 implementation used by migration checksums.
Checksum correctness is required to reliably detect modified migration files.
Current behavior
The module includes a self-contained SHA-256 implementation with:
sha256_hex()convenience function.No automated tests currently validate the implementation.
Expected behavior
The implementation must match standard SHA-256 test vectors and produce identical results regardless of input chunking.
Scope
"abc".Suggested files
modules/db/tests/sha256_test.cppmodules/db/src/Sha256.cppAcceptance criteria
Non-goals
This issue does not include:
Suggested labels
scope:dbtype:citestsgood first issuestatus:ready