{-# LANGUAGE PackageImports #-}
module Codec.Encryption.OpenPGP.Internal.HOBlockCipher (
HOBlockCipher(..)
) where
import qualified "cryptonite" Crypto.Cipher.Types as CCT
import qualified Data.ByteString as B
class HOBlockCipher cipher where
cipherInit :: B.ByteString -> Either String cipher
cipherName :: cipher -> String
cipherKeySize :: cipher -> CCT.KeySizeSpecifier
blockSize :: cipher -> Int
cfbEncrypt :: cipher -> B.ByteString -> B.ByteString -> Either String B.ByteString
cfbDecrypt :: cipher -> B.ByteString -> B.ByteString -> Either String B.ByteString
paddedCfbEncrypt :: cipher -> B.ByteString -> B.ByteString -> Either String B.ByteString
paddedCfbEncrypt = cfbEncrypt
paddedCfbDecrypt :: cipher -> B.ByteString -> B.ByteString -> Either String B.ByteString
paddedCfbDecrypt = cfbDecrypt