File: test-r_hash.py

package info (click to toggle)
radare2 0.9.6-3.1%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 17,496 kB
  • ctags: 45,959
  • sloc: ansic: 240,999; sh: 3,645; makefile: 2,520; python: 1,212; asm: 312; ruby: 214; awk: 209; perl: 188; lisp: 169; java: 23; xml: 17; php: 6
file content (13 lines) | stat: -rwxr-xr-x 295 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
# XXX: r_hash is not bindable atm :(
#from r2.r_hash import rHash, Size_MD4
try:
	from r_core import RHash, Size_MD4
except:
	from r2.r_core import RHash, Size_MD4

hash = RHash(False)
ret = hash.do_md4 ("food", 4)
str = "md4: "
for i in range(0, Size_MD4):
	str += "%02x"%ord(ret[i])
print str