1RAHASH2(1) BSD General Commands Manual RAHASH2(1)
2
4 rahash2 — block based hashing utility
5
7 rahash2 [-BbdDehjrknvq] [-a algorithm] [-b size] [-D algo] [-E algo]
8 [-f from] [-i iterations] [-I IV] [-n blocks] [-s string]
9 [-S seed] [-p type] [-x hexstr] [-t to] [-c hash] [[file] ...]
10
12 This program is part of the radare project.
13
14 Rahash2 allows you to calculate, check and show the hash values of each
15 block of a target file. The block size is 32768 bytes by default. It's
16 allowed to hash from stdin using '-' as a target file. You can compare
17 against a known hash and get the result in the exit status.
18
19 You can hash big files by hashing each block and later determine what
20 part of it has been modified. Useful for filesystem analysis.
21
22 This command can be used to calculate hashes of a certain part of a file
23 or a command line passed string.
24
25 This is the command used by the 'ph' command of radare.
26
27 -a algo Select an algorithm for the hashing. Valid values are listed
28 in: rahash2 -L
29
30 -b blocksize
31 Define the block size
32
33 -c hash Compare the computed hash with this one. Allowed only when a
34 single hash is computed.
35
36 -D algo Decrypt instead of hash using the given algorithm (base64,
37 base91, rc4, aes, xor, blowfish, rot, rol, ror, rc2, rc6,
38 punycode)
39
40 -e Use little endian to display checksums
41
42 -E algo Encrypt instead of hash using the given algorithm (base64,
43 base91, rc4, aes, xor, blowfish, rot, rol, ror, rc2, rc6,
44 punycode)
45
46 -i iters Apply the hash Iters times to itself+seed
47
48 -I [^]s:string|hexstr
49 Set initialization vector (IV) for the cryptographic func‐
50 tions.
51
52 -j Show output in JSON (see -r)
53
54 -B Show per-block hash
55
56 -k Show result using OpenSSH's VisualHostKey randomart algorithm
57
58 -n Amount of blocks to hash
59
60 -s string Hash this string instead of using the 'source' and 'hash-
61 file' arguments.
62
63 -S [^]s:string|hexstr
64 Set seed to hash with, use ^to prefix seed, otherwise its
65 suffixed. If the seed is just a dash '-' it will read from
66 stdin, this is useful to provide huge XOR payloads or other
67 crypto keys bigger than few bytes.
68
69 -f from Start hashing at given address
70
71 -t to Stop hashing at given address
72
73 -p arg Show vertical entropy/statistical entropy graphs
74
75 -q Quiet mode (-qq for even quieter!)
76
77 -r Show output in radare commands
78
79 -x hexstr Hash the given hexpair string instead of using the 'source'
80 and 'hash-file' arguments.
81
82 -v Show version information
83
84 -h Show usage help message.
85
87 The rahash2 utility exits 0 on success, and >0 if an error occurs.
88
89 When -c is used, exit status 0 indicates a match between the expected and
90 computed hashes.
91
93 radare2(1)
94
96 pancake <pancake@nopcode.org>
97
98 Feb 6, 2015