aboutsummaryrefslogtreecommitdiff
path: root/lib/data/data.ex
blob: 2c6e629abdf5dcd6a9a9e119fc850ec9b590deb1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
defmodule SData do
  @moduledoc """
  Utility functions
  """

  @doc """
  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))
  end

end