Skip to content

Instantly share code, notes, and snippets.

@benjamintanweihao
Forked from 10nin/Crypto.ex
Created January 13, 2014 17:15
Show Gist options
  • Select an option

  • Save benjamintanweihao/8404062 to your computer and use it in GitHub Desktop.

Select an option

Save benjamintanweihao/8404062 to your computer and use it in GitHub Desktop.
defmodule Crypto do
def md5(s) do
list_to_binary(Enum.map(bitstring_to_list(:crypto.md5(s)), fn(x) -> integer_to_binary(x, 16) end))
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment