Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
class (HasSecretKey c, HasNonce c, HasCiphertext c) => Cipher c where Source #
Nothing
cipherEncrypt :: SecretKey c -> Nonce c -> ByteString -> Ciphertext c Source #
default cipherEncrypt :: IncrementalCipher c => SecretKey c -> Nonce c -> ByteString -> Ciphertext c Source #
cipherDecrypt :: SecretKey c -> Nonce c -> Ciphertext c -> Maybe ByteString Source #
default cipherDecrypt :: IncrementalCipher c => SecretKey c -> Nonce c -> Ciphertext c -> Maybe ByteString Source #
Instances
data family SecretKey alg Source #
Instances
data family Nonce alg Source #
Instances
data family Ciphertext alg Source #
Instances
data family LazyCiphertext alg Source #
Instances
cipherEncryptProxy :: Cipher c => Proxy c -> SecretKey c -> Nonce c -> ByteString -> Ciphertext c Source #
cipherDecryptProxy :: Cipher c => Proxy c -> SecretKey c -> Nonce c -> Ciphertext c -> Maybe ByteString Source #
cipherEncryptFile :: (Cipher c, MonadIO m) => SecretKey c -> Nonce c -> FilePath -> m (Ciphertext c) Source #
cipherDecryptFile :: (Cipher c, MonadIO m) => SecretKey c -> Nonce c -> FilePath -> m (Maybe ByteString) Source #
class (Cipher c, HasLazyCiphertext c) => IncrementalCipher c where Source #
cipherEncryptLazy :: SecretKey c -> Nonce c -> ByteString -> LazyCiphertext c Source #
cipherDecryptLazy :: SecretKey c -> Nonce c -> LazyCiphertext c -> Maybe ByteString Source #
Instances
cipherEncryptFileLazy :: (IncrementalCipher c, MonadIO m) => SecretKey c -> Nonce c -> FilePath -> m (LazyCiphertext c) Source #
cipherDecryptFileLazy :: (IncrementalCipher c, MonadIO m) => SecretKey c -> Nonce c -> FilePath -> m (Maybe ByteString) Source #