26 Unix tools. One binary. Zero dependencies. · the missing coreutils for AI pipelines · vrk mcp - expose all 26 tools to any AI agent · brew install vrk - ready in 5 seconds · 26 Unix tools. One binary. Zero dependencies. · the missing coreutils for AI pipelines · vrk mcp - expose all 26 tools to any AI agent · brew install vrk - ready in 5 seconds

vrk digest

About

Hashes strings, stdin, or files with SHA-256, MD5, or SHA-512. Also computes HMACs for verifying webhook signatures with constant-time comparison, so timing attacks are not a concern. Streams input, so it handles files of any size without loading them into memory.

The problem

You need to verify a webhook signature or compare file hashes and the openssl command is different for HMAC vs plain hash. You forget the -binary flag, get hex-encoded input to the HMAC, and the signature never matches.

Before and after

Before

echo -n "$PAYLOAD" | openssl dgst -sha256 -hmac "$WEBHOOK_SECRET" -binary | xxd -p
# -binary is easy to forget; without it you HMAC the hex string, not the bytes
# output format differs between openssl versions

After

echo -n "$PAYLOAD" | vrk digest --hmac --key "$WEBHOOK_SECRET" --bare

Example

vrk digest 'hello'

Exit codes

CodeMeaning
0Success, hash written, or –verify matched
1File not found, read error, or –verify mismatch
2Unknown algorithm, –hmac without –key, –verify without –hmac

Flags

FlagShortTypeDescription
--algo-astringHash algorithm: sha256, md5, sha512
--bare-bboolOutput hex hash only, without algo: prefix
--file[]stringPath to file to hash (repeatable)
--compareboolCompare hashes of all –file inputs
--hmacboolCompute HMAC instead of plain hash
--key-kstringHMAC secret key (required with –hmac)
--verifystringKnown HMAC hex to verify against
--json-jboolEmit JSON object instead of algo:hash line
--quiet-qboolSuppress stderr output