base64-encode the hashes
This commit is contained in:
parent
aa7d7e55cb
commit
dfd1b0e1f7
1 changed files with 2 additions and 2 deletions
|
@ -10,8 +10,8 @@ import Control.Monad.Trans (liftIO)
|
||||||
import Crypto.Hash
|
import Crypto.Hash
|
||||||
|
|
||||||
import qualified Data.ByteString as BS
|
import qualified Data.ByteString as BS
|
||||||
|
|
||||||
import Data.ByteString.Builder (byteString)
|
import Data.ByteString.Builder (byteString)
|
||||||
|
import Data.ByteString.Base64
|
||||||
|
|
||||||
import Data.String (fromString)
|
import Data.String (fromString)
|
||||||
|
|
||||||
|
@ -80,4 +80,4 @@ avatarList = do
|
||||||
liftIO $ avatarSelect conn
|
liftIO $ avatarSelect conn
|
||||||
|
|
||||||
md5 :: BS.ByteString -> BS.ByteString
|
md5 :: BS.ByteString -> BS.ByteString
|
||||||
md5 bs = fromString (show ( hash bs :: Digest MD5))
|
md5 bs = encode $ fromString (show ( hash bs :: Digest MD5))
|
||||||
|
|
Loading…
Reference in a new issue