77 |
let get_sha1 s pos = |
let get_sha1 s pos = |
78 |
try Sha1.direct_of_string (String.sub s pos 20) |
try Sha1.direct_of_string (String.sub s pos 20) |
79 |
with e -> |
with e -> |
80 |
lprintf "exception in get_sha1 %d s=%s\n" pos (String.escaped s); |
(* lprintf "exception in get_sha1 %d s=%s\n" pos (String.escaped s); *) |
81 |
raise e |
raise e |
82 |
|
|
83 |
let buf_md4 buf s = Buffer.add_string buf (Md4.direct_to_string s) |
let buf_md4 buf s = Buffer.add_string buf (Md4.direct_to_string s) |
85 |
let get_md4 s pos = |
let get_md4 s pos = |
86 |
try Md4.direct_of_string (String.sub s pos 16) |
try Md4.direct_of_string (String.sub s pos 16) |
87 |
with e -> |
with e -> |
88 |
lprintf "exception in get_md4 %d s=%s\n" pos (String.escaped s); |
(* lprintf "exception in get_md4 %d s=%s\n" pos (String.escaped s); *) |
89 |
raise e |
raise e |
90 |
|
|
91 |
|
|