kmhjs / zsh-sha-1

SHA-1 algorithm implementation in Z-shell.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Zsh-SHA-1

This project is to implement SHA-1 algorithm in Z-shell.

Normal version and Binary version

This project has 2 versions; normal and binary version.
Originally, the project was created as binary version, and ported to normal version.

Main difference is that the value is treated as binary string or not.

Requirements

  • zsh
    • Tested with zsh 5.2 (x86_64-apple-darwin15.0.0)
  • printf

Usage

  • Normal version
target_string='Input string'

source sha1.sh
sha1::main ${target_string}
  • Binary version
target_string='Input string'

source sha1.binary.sh
sha1::main ${target_string}

Test

Note

  • Normal version is faster than binary one.
  • In Normal version, the value expressed in more than 32-bits is treated in binary notation (e.g. 512-bits).

References

License

See LICENSE.

About

SHA-1 algorithm implementation in Z-shell.

License:MIT License


Languages

Language:Shell 100.0%