diff options
-rw-r--r-- | Encryption.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Encryption.hs b/Encryption.hs index 3e085a0..be1e398 100644 --- a/Encryption.hs +++ b/Encryption.hs @@ -202,7 +202,9 @@ encodeEncryptableBytes tunables content = EncryptableBytes $ -- | Encoded, so that it does not contain any NULs. sha :: B.ByteString -> B.ByteString -sha = BU8.fromString . Raaz.showBase16 . Raaz.sha256 +sha = Raaz.toByteString . enc . Raaz.sha256 + where enc :: Raaz.Encodable a => a -> Raaz.Base16 + enc = Raaz.encode padBytes :: Int -> B.ByteString -> B.ByteString padBytes n b = b <> padding |