Skip to content

Latest commit

 

History

History
37 lines (27 loc) · 1.4 KB

README.md

File metadata and controls

37 lines (27 loc) · 1.4 KB

hash

Plugin for Oh My Fish.

Computes string digests using various hashing algorithms.

Install

$ omf install hash

Usage

The hash function does just one simple thing: it takes an algorithm and a string, computes the string's hash with the given algorithm, and prints out the result. The string to digest can be provided either as an argument, or piped in from standard input:

# command line argument...
$ hash md5 "Hello World!"
# ...or piped
$ cat myfile.txt | hash md5

The available algorithms depend on what utilities you have installed on your system. If you have GNU coreutils installed, any of the algorithms that have an <algorithm>sum command will be available. On BSD, the core digest commands provide the md5, sha1, sha256, sha512, and rmd160 algorithms. Finally, if OpenSSL is installed, any algorithm installed for OpenSSL will also be available. To see if a given algorithm is available, you can run

$ hash -q <algorithm>

License

MIT © coderstephen et al