aboutsummaryrefslogtreecommitdiff
path: root/lib/data/data.ex
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2018-07-10 14:04:14 +0200
committerAlex Auvolat <alex@adnab.me>2018-07-10 14:04:14 +0200
commit582f1d65463f8f5cbcc34c6129670b473793c4dd (patch)
treeb3c4bc6a1a35c0f624795dc2be83b0420261dffd /lib/data/data.ex
parentd786bbd6e43d88b50085d1ecce6288a617bebbe8 (diff)
downloadshard-582f1d65463f8f5cbcc34c6129670b473793c4dd.tar.gz
shard-582f1d65463f8f5cbcc34c6129670b473793c4dd.zip
Mini change
Diffstat (limited to 'lib/data/data.ex')
-rw-r--r--lib/data/data.ex4
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