File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -7,5 +7,27 @@ let blake2s s =
7
7
let ctx = Digestif.BLAKE2S. feed_string ctx s in
8
8
Digestif.BLAKE2S. get ctx |> Digestif.BLAKE2S. to_hex
9
9
10
+ let blake2b s =
11
+ let ctx = Digestif.BLAKE2B. empty in
12
+ let ctx = Digestif.BLAKE2B. feed_string ctx s in
13
+ Digestif.BLAKE2B. get ctx |> Digestif.BLAKE2B. to_hex
10
14
15
+ let md5 s =
16
+ let ctx = Digestif.MD5. empty in
17
+ let ctx = Digestif.MD5. feed_string ctx s in
18
+ Digestif.MD5. get ctx |> Digestif.MD5. to_hex
11
19
20
+ let sha1 s =
21
+ let ctx = Digestif.SHA1. empty in
22
+ let ctx = Digestif.SHA1. feed_string ctx s in
23
+ Digestif.SHA1. get ctx |> Digestif.SHA1. to_hex
24
+
25
+ let sha256 s =
26
+ let ctx = Digestif.SHA256. empty in
27
+ let ctx = Digestif.SHA256. feed_string ctx s in
28
+ Digestif.SHA256. get ctx |> Digestif.SHA256. to_hex
29
+
30
+ let sha512 s =
31
+ let ctx = Digestif.SHA512. empty in
32
+ let ctx = Digestif.SHA512. feed_string ctx s in
33
+ Digestif.SHA512. get ctx |> Digestif.SHA512. to_hex
Original file line number Diff line number Diff line change @@ -1004,6 +1004,15 @@ struct
1004
1004
" to_list_of_tables" , V. efunc (V. list (V. list V. string ) **->> V. list V. value) csv_to_table_list;
1005
1005
] g;
1006
1006
1007
+ C. register_module " Digest" [
1008
+ " md5" , V. efunc (V. string **->> V. string ) Hash. md5;
1009
+ " sha1" , V. efunc (V. string **->> V. string ) Hash. sha1;
1010
+ " sha256" , V. efunc (V. string **->> V. string ) Hash. sha256;
1011
+ " sha512" , V. efunc (V. string **->> V. string ) Hash. sha512;
1012
+ " blake2s" , V. efunc (V. string **->> V. string ) Hash. blake2s;
1013
+ " blake2b" , V. efunc (V. string **->> V. string ) Hash. blake2b;
1014
+ ] g;
1015
+
1007
1016
C. register_module " Date" [
1008
1017
" reformat" , V. efunc (V. string **-> V. list V. string **-> V. string **->> V. option V. string ) reformat_date;
1009
1018
" to_timestamp" , V. efunc (V. string **-> V. list V. string **->> V. option V. int ) to_timestamp;
You can’t perform that action at this time.
0 commit comments