Skip to content

Commit 30a4a7a

Browse files
committed
feat: use blake128 instead of md5 to avoid collisions
1 parent e9c2413 commit 30a4a7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/helpers.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ let cache_dir =
2323
dirpath
2424

2525
let get_cache_file file_name cache_type =
26-
let hash = Digest.to_hex @@ Digest.MD5.file file_name in
26+
let hash = Digest.BLAKE128.to_hex @@ Digest.BLAKE128.file @@ file_name in
2727

2828
cache_dir ^ hash ^ match cache_type with `TEXT -> ".txt" | `THUMB -> ".png"

0 commit comments

Comments
 (0)