RZ-HASH(1)
π 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 thephcommand ofrizin.
β¨ 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-Sto set the key and-Ito set IV (if needed). π-E algoβ Encrypt the given input; use-Sto set the key and-Ito 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'srandomkeyalgorithm.-Lβ List all algorithms. π-qβ Set quiet mode (use-qqto 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-aand 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