#cli #crypto #hashes #rust

app rustgenhash

A tool to generate hashes from the command line

25 releases

new 0.5.7 Sep 23, 2022
0.5.3 Jun 2, 2022
0.4.2 Dec 22, 2021
0.3.1 Sep 26, 2021
0.2.2 Nov 4, 2020

#124 in Cryptography

Download history 70/week @ 2022-06-06 10/week @ 2022-06-13 6/week @ 2022-06-20 30/week @ 2022-06-27 4/week @ 2022-07-04 22/week @ 2022-07-11 43/week @ 2022-07-18 46/week @ 2022-07-25 3/week @ 2022-08-01 1/week @ 2022-08-08 2/week @ 2022-08-15 40/week @ 2022-08-22 22/week @ 2022-09-05 68/week @ 2022-09-12 29/week @ 2022-09-19

119 downloads per month

MIT/Apache

17KB
329 lines

rustgenhash

rustgenhash is a tool to generate hashes on the commandline from stdio.

It can be used to generate single or multiple hashes for usage in password databases or even in penetration testing scenarios where you want to test password cracking tools.

Install

rustgenhash is written in Rust. You can install the tool with your Rust installation using following command:

cargo install rustgenhash

Usage

Rustgenhash has a command line interface which allows you to set the utility into a specific operating mode. The current modes are

  • stdio
  • string
  • file

After selecting the mode you will need to provide the -a switch for selecting a suitable hashing algorithm and a string or file to be hashed. The stdio mode allows you to pipe to the rustgenhash command. The tool will hash the passed lines from the stdio (useful for hashing password lists).

The file mode supports hashing of multiple files in a directory and currently works non-recursive.

Scheme for string hashing:

rustgenhash string -a <algorithm> <string>

Scheme for file hashing:

rustgenhash file -a <algorithm> <filename or directory>

Scheme for string hashing from stdio:

cat myfile | rustgenhash stdio -a <algorithm>
echo "mypassword" | rustgenhash stdio -a <algorithm>

You can list all algorithms over the help function.

Supported are:

  • Argon2 (Only String and stdio)
  • Balloon Hashing (Only String and stdio)
  • BLAKE2b
  • BLAKE2s
  • GOST R 34.11-94
  • GOST 34.311-95 UA
  • Grøstl
  • MD2 hash
  • MD4 hash
  • MD5 hash
  • PBKDF2-SHA256 (Only String and stdio)
  • PBKDF2-SHA512 (Only String and stdio)
  • RipeMD160
  • RipeMD320
  • Scrypt (Only String and stdio)
  • SHA-1 hash
  • SHA2-224 hash
  • SHA2-256 hash
  • SHA2-384 hash
  • SHA2-512 hash
  • SHA3-224 hash
  • SHA3-384 hash
  • SHA3-256 hash
  • SHA3-512 hash
  • Shabal192
  • Shabal224
  • Shabal256
  • Shabal384
  • Shabal512
  • Sm3
  • Streebog256
  • Streebog512
  • Tiger (Only String and stdio)
  • Whirlpool

Generate shell completions:

rustgenhash generate-completions <SHELL> > some_path

Supported shells: bash, elvish, fish, power-shell, zsh

Dependencies

~4.5MB
~70K SLoC