diff options
author | Alex Auvolat <alex@adnab.me> | 2018-07-10 14:04:14 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2018-07-10 14:04:14 +0200 |
commit | 582f1d65463f8f5cbcc34c6129670b473793c4dd (patch) | |
tree | b3c4bc6a1a35c0f624795dc2be83b0420261dffd /lib/data/data.ex | |
parent | d786bbd6e43d88b50085d1ecce6288a617bebbe8 (diff) | |
download | shard-582f1d65463f8f5cbcc34c6129670b473793c4dd.tar.gz shard-582f1d65463f8f5cbcc34c6129670b473793c4dd.zip |
Mini change
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 |