RZ_HASH(1)

NAME
rz-hash - block based hashing utility

SYNOPSIS
rz-hash [-BbdDehjrknvq] [-a algorithm] [-b size] [-D algo] [-E algo] [-f from] [-i iterations] [-I IV] [-n blocks] [-s string] [-S seed] [-p type] [-x hexstr] [-t to] [-c hash] [[file] ...]

DESCRIPTION
This program is part of the rizin project.

rz-hash allows you to calculate, check and show the hash values of each block of a target file. The block size is 32768 bytes by default. It's allowed to hash from stdin using '-' as a target file. You can compare against a known hash and get the result in the exit status.

You can hash big files by hashing each block and later determine what part of it has been modified. Useful for filesystem analysis.

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

This is the command used by the 'ph' command of rizin.

-a algo
    Select an algorithm for the hashing. Valid values are listed in: rz-hash -L

-b blocksize
    Define the block size

-c hash
    Compare the computed hash with this one. Allowed only when a single hash is computed.

-D algo
    Decrypt instead of hash using the given algorithm (base64, base91, rc4, aes, xor, blowfish, rot, rol, ror, rc2, rc6, punycode)

-e  Use little endian to display checksums

-E algo
    Encrypt instead of hash using the given algorithm (base64, base91, rc4, aes, xor, blowfish, rot, rol, ror, rc2, rc6, punycode)

-i iters
    Apply the hash Iters times to itself+seed

-I [^]s:string|hexstr
    Set initialization vector (IV) for the cryptographic functions.

-j  Show output in JSON (see -r)

-B  Show per-block hash

-k  Show result using OpenSSH's VisualHostKey randomart algorithm

-n  Amount of blocks to hash

-s string
    Hash this string instead of using the 'source' and 'hash-file' arguments.

-S [^]s:string|hexstr
    Set seed to hash with, use ^to prefix seed, otherwise its suffixed. If the seed is just a dash '-' it will read from stdin, this is useful to provide huge XOR payloads or other crypto keys bigger than few bytes.

-f from
    Start hashing at given address

-t to
    Stop hashing at given address

-p arg
    Show vertical entropy/statistical entropy graphs

-q  Quiet mode (-qq for even quieter!)

-x hexstr
    Hash the given hexpair string instead of using the 'source' and 'hash-file' arguments.

-v  Show version information

-h  Show usage help message.

DIAGNOSTICS

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

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>