Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
hash :: ByteString -> Digest Source #
verifyDigest :: Digest -> ByteString -> Bool Source #
type BlockCipherKey = SecretKey AES256 Source #
type BlockCiphertext = Ciphertext AES256 Source #
newBlockCipherKey :: MonadRandomIO m => m BlockCipherKey Source #
type CipherKey = SecretKey ChaCha20Poly1305 Source #
type CipherNonce = Nonce ChaCha20Poly1305 Source #
type Ciphertext = Ciphertext ChaCha20Poly1305 Source #
newCipherKey :: MonadRandomIO m => m CipherKey Source #
newCipherNonce :: MonadRandomIO m => m CipherNonce Source #
cipherEncrypt :: CipherKey -> CipherNonce -> ByteString -> Ciphertext Source #
cipherDecrypt :: CipherKey -> CipherNonce -> Ciphertext -> Maybe ByteString Source #