diff options
Diffstat (limited to 'lib/data/data.ex')
-rw-r--r-- | lib/data/data.ex | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/data/data.ex b/lib/data/data.ex index 2c6e629..428957c 100644 --- a/lib/data/data.ex +++ b/lib/data/data.ex @@ -7,8 +7,8 @@ defmodule SData do Calculate the hash of an Erlang term by first converting it to its binary representation. """ - def term_hash(term) do - :crypto.hash(:sha256, (:erlang.term_to_binary term)) + def term_hash(term, algo \\ :sha256) do + :crypto.hash(algo, (:erlang.term_to_binary term)) end end |