equal
deleted
inserted
replaced
16 fun hex_string arr i = |
16 fun hex_string arr i = |
17 let val c = CInterface.fromCchar (CInterface.offset i CInterface.Cchar arr) |
17 let val c = CInterface.fromCchar (CInterface.offset i CInterface.Cchar arr) |
18 in (op ^) (pairself hex_digit (Integer.div_mod (Char.ord c) 16)) end |
18 in (op ^) (pairself hex_digit (Integer.div_mod (Char.ord c) 16)) end |
19 |
19 |
20 val lib_path = |
20 val lib_path = |
21 ("$ML_HOME/" ^ (if String.isSuffix "cygwin" ml_platform then "sha1.dll" else "libsha1.so")) |
21 ("$ML_HOME/" ^ (if ML_System.platform_is_cygwin then "sha1.dll" else "libsha1.so")) |
22 |> Path.explode; |
22 |> Path.explode; |
23 |
23 |
24 fun digest_external str = |
24 fun digest_external str = |
25 let |
25 let |
26 val digest = CInterface.alloc 20 CInterface.Cchar; |
26 val digest = CInterface.alloc 20 CInterface.Cchar; |