From 582f1d65463f8f5cbcc34c6129670b473793c4dd Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Tue, 10 Jul 2018 14:04:14 +0200 Subject: Mini change --- lib/data/data.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/data/data.ex') 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 -- cgit v1.2.3