aboutsummaryrefslogblamecommitdiff
path: root/lib/data/data.ex
blob: 428957c6ccc7cfc0b6f6ce3083443f948cae9a90 (plain) (tree)
1
2
3
4
5
6
7
8
9








                                                                    

                                                     


     
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, algo \\ :sha256) do
    :crypto.hash(algo, (:erlang.term_to_binary term))
  end

end