Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
class Encodable a where Source #
encode :: a -> ByteString Source #
decode :: ByteString -> Maybe a Source #
Instances
unsafeDecode :: Encodable a => ByteString -> a Source #
encodeDefault :: LazyEncodable a => a -> ByteString Source #
decodeDefault :: LazyEncodable a => ByteString -> Maybe a Source #
class Encodable a => LazyEncodable a where Source #
Nothing
encodeLazy :: a -> ByteString Source #
decodeLazy :: ByteString -> Maybe a Source #
Instances
unsafeDecodeLazy :: LazyEncodable a => ByteString -> a Source #
data SizeSpecifier a Source #
SizeRange Int Int Int | min max mod | SizeRange Int Int -- ^ min max 1 |
SizeEnum [Int] | one of several sizes |
SizeExact Int | Fixed: exact size |
Instances
Show (SizeSpecifier a) Source # | |
Defined in Botan.Types.Class showsPrec :: Int -> SizeSpecifier a -> ShowS # show :: SizeSpecifier a -> String # showList :: [SizeSpecifier a] -> ShowS # | |
Eq (SizeSpecifier a) Source # | |
Defined in Botan.Types.Class (==) :: SizeSpecifier a -> SizeSpecifier a -> Bool # (/=) :: SizeSpecifier a -> SizeSpecifier a -> Bool # | |
Ord (SizeSpecifier a) Source # | |
Defined in Botan.Types.Class compare :: SizeSpecifier a -> SizeSpecifier a -> Ordering # (<) :: SizeSpecifier a -> SizeSpecifier a -> Bool # (<=) :: SizeSpecifier a -> SizeSpecifier a -> Bool # (>) :: SizeSpecifier a -> SizeSpecifier a -> Bool # (>=) :: SizeSpecifier a -> SizeSpecifier a -> Bool # max :: SizeSpecifier a -> SizeSpecifier a -> SizeSpecifier a # min :: SizeSpecifier a -> SizeSpecifier a -> SizeSpecifier a # |
coerceSizeSpec :: SizeSpecifier a -> SizeSpecifier b Source #
monoMapSizes :: (Int -> Int) -> SizeSpecifier a -> SizeSpecifier a Source #
minSize :: SizeSpecifier a -> Int Source #
maxSize :: SizeSpecifier a -> Int Source #
allSizes :: SizeSpecifier a -> [Int] Source #
defaultSize :: SizeSpecifier a -> Int Source #
sizeIsValid :: SizeSpecifier a -> Int -> Bool Source #
newSized :: MonadRandomIO m => SizeSpecifier a -> m ByteString Source #
newSizedMaybe :: MonadRandomIO m => SizeSpecifier a -> Int -> m (Maybe ByteString) Source #
data family SecretKey alg Source #
Instances
class Encodable (SecretKey alg) => HasSecretKey alg where Source #
secretKeySpec :: SizeSpecifier (SecretKey alg) Source #
Instances
class (HasSecretKey alg, Monad m) => SecretKeyGen alg (m :: Type -> Type) where Source #
newSecretKey :: m (SecretKey alg) Source #
newSecretKeyMaybe :: Int -> m (Maybe (SecretKey alg)) Source #
Instances
newtype GSecretKey Source #
Instances
Show GSecretKey Source # | |
Defined in Botan.Types.Class showsPrec :: Int -> GSecretKey -> ShowS # show :: GSecretKey -> String # showList :: [GSecretKey] -> ShowS # | |
Encodable GSecretKey Source # | |
Defined in Botan.Types.Class encode :: GSecretKey -> ByteString Source # decode :: ByteString -> Maybe GSecretKey Source # | |
Eq GSecretKey Source # | |
Defined in Botan.Types.Class (==) :: GSecretKey -> GSecretKey -> Bool # (/=) :: GSecretKey -> GSecretKey -> Bool # | |
Ord GSecretKey Source # | |
Defined in Botan.Types.Class compare :: GSecretKey -> GSecretKey -> Ordering # (<) :: GSecretKey -> GSecretKey -> Bool # (<=) :: GSecretKey -> GSecretKey -> Bool # (>) :: GSecretKey -> GSecretKey -> Bool # (>=) :: GSecretKey -> GSecretKey -> Bool # max :: GSecretKey -> GSecretKey -> GSecretKey # min :: GSecretKey -> GSecretKey -> GSecretKey # |
class (Eq n, Ord n, Encodable n) => IsNonce n where Source #
Instances
IsNonce GNonce Source # | |
IsNonce (Nonce ChaCha20Poly1305) Source # | |
Defined in Botan.Cipher.ChaCha20Poly1305 |
data family Nonce alg Source #
Instances
class IsNonce (Nonce alg) => HasNonce alg where Source #
nonceSpec :: SizeSpecifier (Nonce alg) Source #
Instances
class (HasNonce alg, Monad m) => NonceGen alg (m :: Type -> Type) where Source #
Instances
MonadRandomIO m => NonceGen ChaCha20Poly1305 m Source # | |
Defined in Botan.Cipher.ChaCha20Poly1305 newNonce :: m (Nonce ChaCha20Poly1305) Source # newNonceMaybe :: Int -> m (Maybe (Nonce ChaCha20Poly1305)) Source # |
class Encodable (Salt alg) => HasSalt alg where Source #
saltSpec :: SizeSpecifier (Salt alg) Source #
data family Ciphertext alg Source #
Instances
class (Eq (Ciphertext alg), Ord (Ciphertext alg), Encodable (Ciphertext alg)) => HasCiphertext alg Source #
Instances
newtype GCiphertext Source #
Instances
Show GCiphertext Source # | |
Defined in Botan.Types.Class showsPrec :: Int -> GCiphertext -> ShowS # show :: GCiphertext -> String # showList :: [GCiphertext] -> ShowS # | |
Encodable GCiphertext Source # | |
Defined in Botan.Types.Class encode :: GCiphertext -> ByteString Source # decode :: ByteString -> Maybe GCiphertext Source # | |
Eq GCiphertext Source # | |
Defined in Botan.Types.Class (==) :: GCiphertext -> GCiphertext -> Bool # (/=) :: GCiphertext -> GCiphertext -> Bool # | |
Ord GCiphertext Source # | |
Defined in Botan.Types.Class compare :: GCiphertext -> GCiphertext -> Ordering # (<) :: GCiphertext -> GCiphertext -> Bool # (<=) :: GCiphertext -> GCiphertext -> Bool # (>) :: GCiphertext -> GCiphertext -> Bool # (>=) :: GCiphertext -> GCiphertext -> Bool # max :: GCiphertext -> GCiphertext -> GCiphertext # min :: GCiphertext -> GCiphertext -> GCiphertext # |
data family LazyCiphertext alg Source #
Instances
class (HasCiphertext alg, Eq (LazyCiphertext alg), Ord (LazyCiphertext alg), LazyEncodable (LazyCiphertext alg)) => HasLazyCiphertext alg where Source #
Nothing
toStrictCiphertext :: LazyCiphertext alg -> Ciphertext alg Source #
fromStrictCiphertext :: Ciphertext alg -> LazyCiphertext alg Source #
Instances
newtype GLazyCiphertext Source #