RZ-HASH(1)

πŸ“¦
version 0.8.2 Β· 2 versions
, in arch rolling, epel 10, epel 9, fedora 43, fedora 44, nixos 26.05

πŸ’– RZ-HASH β€” block based hashing utility ✨

okay bestie, so this is rz-hash(1) β€” the Rizin project's block based hashing utility, and honestly? she's a baddie. 🫢


🌈 SYNOPSIS

rz-hash [-vhBkjLq] [-a algorithm] [-b size] [-c hash] [-D algo]
        [-E algo] [-s string] [-x hexstr] [-f from] [-t to] [-c hash]
        [[file] ...]

(yes the -c hash is in there twice, no I did not do that, I'm just reporting the facts fr fr πŸ’€)


🌸 DESCRIPTION

So this little icon is part of the Rizin project β€” you know, the whole family. πŸ’œ

rz-hash lets you calculate, check, and show the hash values of each block of a target file. The block size defaults to 32768 bytes, periodt. And listen β€” you can totally hash from stdin by using - as a target file. You can compare against a known hash and get the result back in the exit status. Very demure, very mindful.

You can hash big files by hashing each block, and later figure out what part of it got modified. Super useful for filesystem analysis, no cap. πŸ”₯

This command can also be used to calculate hashes of a certain part of a file, or of a command line passed string.

πŸ’… iykyk moment: this is literally the command used by the ph command of rizin.

✨ OPTIONS ✨

here's the whole menu bestie, don't skip a single one:

  • -v β€” Show version information. 🌸
  • -h β€” Show usage help message.
  • - β€” Input read from stdin instead of from a file.
  • -a algo β€” Hash algorithm to use. You can specify multiple ones by appending a comma (example: sha1,md4,md5,sha256). πŸŽ€
  • -B β€” Output the calculated value for each block.
  • -b size β€” Set the block size.
  • -c value β€” Compare calculated value with a given one (hexadecimal).
  • -e endian β€” Set the endianness. Default is 'big'; accepted values are 'big' or 'little'.
  • -D algo β€” Decrypt the given input; use -S to set the key and -I to set IV (if needed). πŸ”
  • -E algo β€” Encrypt the given input; use -S to set the key and -I to set IV (if needed). πŸ”
  • -f from β€” Start the calculation at the given offset.
  • -t to β€” Stop the calculation at the given offset.
  • -I iv β€” Set the initialization vector (IV).
  • -i times β€” Repeat the calculation N times.
  • -j β€” Output the result as a JSON structure. πŸ¦‹
  • -k β€” Output the calculated value using openssh's randomkey algorithm.
  • -L β€” List all algorithms. πŸ‘‘
  • -q β€” Set quiet mode (use -qq to get only the calculated value).
  • -S seed β€” Set the seed for -a; use '^' to append it before the input. Use '@' prefix to load it from a file and '-' to read it.
  • -K key β€” Set the HMAC key for -a and the key for -E/-D. Use '@' prefix to load it from a file and '-' to read it from stdin (you can combine them). πŸ”‘
  • -s string β€” Input read from a zero-terminated string instead of from a file.
  • -x hex β€” Input read from a hexadecimal value instead of from a file.
πŸ’– psst β€” all the inputs (besides -s/-x/-c) can be hexadecimal or strings if the 's:' prefix is specified. literally so handy.

🩺 DIAGNOSTICS

The rz-hash utility exits 0 on success, and >0 if an error occurs.

When -c is used, exit status 0 indicates a match between the expected and computed hashes. slay. βœ…


πŸ‘€ SEE ALSO

rizin(1), rz-find(1), rz-hash(1), rz-bin(1), rz-diff(1), rz-asm(1), rz-gg(1), rz-run(1), rz-ax(1),


πŸ’œ AUTHORS

  • pancake <pancake@nopcode.org>
  • byteninjaa0

okay that's the whole page bestie, we ate and left no crumbs πŸ“πŸ§š

this iconic lil manual is from Jan 24, 2024, and it's serving RZ_HASH(1) realness β€” mwah πŸ’…βœ¨

πŸ“¦ where this page comes from
  • arch rolling: rizin 0.8.2-2 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND CC-PDDC AND CC0-1.0 AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-only AND GPL-3.0-or-later AND LGPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND LGPL-3.0-only AND MIT
  • epel 10: rizin 0.7.4-5.el10_1 Β· LGPL-3.0-or-later AND GPL-2.0-or-later AND BSD-2-Clause AND BSD-3-Clause AND MIT AND Apache-2.0 AND MPL-2.0 AND Zlib
  • epel 9: rizin 0.7.4-5.el9 Β· LGPL-3.0-or-later AND GPL-2.0-or-later AND BSD-2-Clause AND BSD-3-Clause AND MIT AND Apache-2.0 AND MPL-2.0 AND Zlib
  • fedora 43: rizin 0.7.4-9.fc43 Β· LGPL-3.0-or-later AND GPL-2.0-or-later AND BSD-2-Clause AND BSD-3-Clause AND MIT AND Apache-2.0 AND MPL-2.0 AND Zlib
  • fedora 43: rizin 0.7.4-9.fc43 Β· LGPL-3.0-or-later AND GPL-2.0-or-later AND BSD-2-Clause AND BSD-3-Clause AND MIT AND Apache-2.0 AND MPL-2.0 AND Zlib
  • fedora 44: rizin 0.7.4-9.fc43 Β· LGPL-3.0-or-later AND GPL-2.0-or-later AND BSD-2-Clause AND BSD-3-Clause AND MIT AND Apache-2.0 AND MPL-2.0 AND Zlib
  • fedora 44: rizin 0.7.4-9.fc43 Β· LGPL-3.0-or-later AND GPL-2.0-or-later AND BSD-2-Clause AND BSD-3-Clause AND MIT AND Apache-2.0 AND MPL-2.0 AND Zlib
  • nixos 26.05: rizin 0.8.2
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms