hash¶
Calculate cryptographic hashes.
Synopsis¶
Description¶
Calculate cryptographic hashes for files or standard input. Supports MD5, SHA-1, SHA-256, and SHA-512.
Flags¶
| Flag | Short | Description | Default |
|---|---|---|---|
--algo |
-a |
Hash algorithm: md5, sha1, sha256, sha512 |
sha256 |
Examples¶
Hash a file (SHA-256 by default):
Hash with MD5:
Hash with SHA-512:
Hash from stdin:
Hash multiple files:
Verify a file hash:
Sample Output¶
Notes¶
- Output format matches standard tools (
sha256sum,md5sum, etc.) - The hash is displayed in hexadecimal format
- Use SHA-256 or SHA-512 for security-sensitive applications
- MD5 and SHA-1 are provided for compatibility but are not recommended for security