Created
March 8, 2016 17:38
-
-
Save lukehoersten/6dea9cfc695bb76b4e7b to your computer and use it in GitHub Desktop.
Revisions
-
lukehoersten created this gist
Mar 8, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ import Crypto.BCrypt (hashPasswordUsingPolicy) import Data.ByteString.Char8 (ByteString, pack) hash :: String -> IO (Maybe ByteString) hash = hashPasswordUsingPolicy hp . pack where hp = HashingPolicy 12 $ pack "$2y$"