2025-09-02 15:55:01 +12:00
2025-09-02 15:55:01 +12:00

dshash

Simple SHA256 hashing library and example utility

dshash C++ class

  • located in src/
  • A simple implementation of SHA256 with no dependencies.
  • Just two files: dshash.cpp and dshash.hpp
  • can hash a file, directory tree, or string.
  • uses std::array<uint8_t, 32> as the underlying type
  • generally used as a std::string, containing the hex representation of the hash.

dshash utility

  • located in dshash/
  • no dependencies, statically linked
  • simple command line utilty to calculate hash of file or directory
  • outputs the hash only with a newline
  • -v (verbose) mode lists the individual files as they are processed.

testing

  • testing of both the C++ class and the dshash utility are in tests/
  • ./test.sh runs all tests and returns success only if all pass.

publishing

  • dshash utility published as a getpkg.xyz package, and also available from getbin.xyz.
Description
Simple SHA256 hashing library and example utility
Readme 6.3 MiB
Languages
C++ 64%
Shell 35%
Makefile 1%