Skip to content

Instantly share code, notes, and snippets.

@aplainzetakind
Created November 23, 2020 10:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aplainzetakind/155843dab732f0aeffb5bb0e3b679021 to your computer and use it in GitHub Desktop.
Save aplainzetakind/155843dab732f0aeffb5bb0e3b679021 to your computer and use it in GitHub Desktop.
import Data.Digest.Pure.MD5
import qualified Data.ByteString.Lazy.Char8 as BSL (fromStrict)
import qualified Data.Text.Encoding as T
import qualified Data.Text as T
getHash :: String -> String
getHash = T.unpack . T.decodeUtf8 . md5DigestBytes . md5
. BSL.fromStrict . T.encodeUtf8 . T.pack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment