Skip to main content
Version: 0.1.24

SHA utility

Message digest (SHA, MD5, etc.) command-line utility.

Command-line tool to compute message digests (hashes) using NoxTLS mdigest. Top-level command: dgst — compute a hash. Parameters: after the command, specify the algorithm name, then optional switches and input (string or hex). Options: -v Version information -h Help (global); or for dgst: interpret input as hex -d Enable debug output (dgst only) Algorithms: MD5, SHA1, SHA224, SHA256, SHA384, SHA512, SHA512_224, SHA512_256.

Building

Built as part of the main project when BUILD_APPLICATIONS is ON. Target name: sha (or similar per CMake).

Usage

sha [command] [options] [arguments]
  • Top-level command: dgst — compute a message digest.
  • Global options: -h (help), -v (version).

Command: dgst

Compute a hash using one of the supported algorithms.

sha dgst <algorithm> [options] <input>

Algorithms

MD5, SHA1, SHA224, SHA256, SHA384, SHA512, SHA512_224, SHA512_256.

Options

OptionDescription
-hInput is hex-encoded (decode before hashing).
-dEnable debug output.

Examples

Hash a string (default is string input):

sha dgst SHA256 hello world

Hash from hex input (use -h and pass hex string):

sha dgst SHA256 -h 68656c6c6f

Show help and version:

sha -h
sha -v

Examples

Hash a string with SHA-256: sha dgst SHA256 hello world Hash from hex input: sha dgst SHA256 -h 68656c6c6f Show help and version: sha -h sha -v