digestify-0.2.1 is not a library.
Visit the last successful build:
digestify-0.4.0
Digestify
digest·i·fy -| _ˈdī-ˌjest-ə-ˌfī
verb - Portmanteau of digest and verify. Compute a digest of a file and verify that the digest matches a provided value.
noun - Command line tool to make verification of digests/checksums/hashes on downloaded files a little easier. Just specity the file and the hash listed on the download host. It will infer the possible digest algorithm(s) from the length. It's process exit code will be indicate whether the digest matches.
Supported Digests
Algorithm | BitLength | HexadecimalLength |
---|---|---|
SHA-512 | 512 | 128 |
SHA-256 | 256 | 64 |
SHA-1 | 160 | 40 |
MD5 | 128 | 32 |
CRC-32 | 32 | 8 |
Usage
$ digestify -h
digestify 0.2.1
Verify a file against a digest/checksum/hash.
USAGE:
digestify <FILE> <DIGEST>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
ARGS:
<FILE> File to verify
<DIGEST> Digest to compare to. Must be specified as
a hexadecimal string. Case does not matter.
If a match is found against one of the digest algorithms, the command will succeed. Otherwise, it will fail.
Example Usages
# digestify Cargo.lock ac4a0ad1af6773ce6980cc9958cfd18820275f28b8055b93e4d69688e2fd72c8
Verifying 'Cargo.lock' against provided digest of size 64 hex chars / 256 bits. Candidate digest(s): SHA-256.
SHA-256: MATCHES
Expected=ac4a0ad1af6773ce6980cc9958cfd18820275f28b8055b93e4d69688e2fd72c8
Actual=ac4a0ad1af6773ce6980cc9958cfd18820275f28b8055b93e4d69688e2fd72c8
# echo $?
0
# digestify Cargo.toml f26c2e4e001349b737a3a5cc5fc4afc87b423773
Verifying 'Cargo.toml' against provided digest of size 40 hex chars / 160 bits. Candidate digest(s): SHA-1.
SHA-1: FAIL
Expected=f26c2e4e001349b737a3a5cc5fc4afc87b423773
Actual=a30d387b67f1e4d26fd59b3ddb94cfde58d23287
# echo $?
254