Skip to content

Instantly share code, notes, and snippets.

@ChinaXing
Created March 27, 2015 07:12
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChinaXing/9750cce69b84aad8267f to your computer and use it in GitHub Desktop.
Save ChinaXing/9750cce69b84aad8267f to your computer and use it in GitHub Desktop.
erlang-md5-hex-string
get_md5_hex_str(Str) ->
X = erlang:md5(Str),
[begin if N < 10 -> 48 + N; true -> 87 + N end end || <<N:4>> <= X].
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment