Safe Haskell | None |
---|---|
Language | Haskell2010 |
Botan.Types.Class
Documentation
class Encodable a where 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 #
Minimal complete definition
Nothing
Instances
unsafeDecodeLazy :: LazyEncodable a => ByteString -> a Source #
data SizeSpecifier a Source #
Constructors
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 Methods showsPrec :: Int -> SizeSpecifier a -> ShowS # show :: SizeSpecifier a -> String # showList :: [SizeSpecifier a] -> ShowS # | |
Eq (SizeSpecifier a) Source # | |
Defined in Botan.Types.Class Methods (==) :: SizeSpecifier a -> SizeSpecifier a -> Bool # (/=) :: SizeSpecifier a -> SizeSpecifier a -> Bool # | |
Ord (SizeSpecifier a) Source # | |
Defined in Botan.Types.Class Methods 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 #
Methods
secretKeySpec :: SizeSpecifier (SecretKey alg) Source #
Instances
class (HasSecretKey alg, Monad m) => SecretKeyGen alg (m :: Type -> Type) where Source #
Methods
newSecretKey :: m (SecretKey alg) Source #
newSecretKeyMaybe :: Int -> m (Maybe (SecretKey alg)) Source #
Instances
newtype GSecretKey Source #
Constructors
MkGSecretKey | |
Fields |
Instances
Show GSecretKey Source # | |
Defined in Botan.Types.Class Methods showsPrec :: Int -> GSecretKey -> ShowS # show :: GSecretKey -> String # showList :: [GSecretKey] -> ShowS # | |
Encodable GSecretKey Source # | |
Defined in Botan.Types.Class | |
Eq GSecretKey Source # | |
Defined in Botan.Types.Class | |
Ord GSecretKey Source # | |
Defined in Botan.Types.Class Methods 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 Methods nudge :: Nonce ChaCha20Poly1305 -> Nonce ChaCha20Poly1305 Source # |
data family Nonce alg Source #
Instances
class IsNonce (Nonce alg) => HasNonce alg where Source #
Methods
nonceSpec :: SizeSpecifier (Nonce alg) Source #
Instances
HasNonce ChaCha20Poly1305 Source # | |
Defined in Botan.Cipher.ChaCha20Poly1305 Methods nonceSpec :: SizeSpecifier (Nonce ChaCha20Poly1305) Source # |
class (HasNonce alg, Monad m) => NonceGen alg (m :: Type -> Type) where Source #
Instances
MonadRandomIO m => NonceGen ChaCha20Poly1305 m Source # | |
Defined in Botan.Cipher.ChaCha20Poly1305 Methods newNonce :: m (Nonce ChaCha20Poly1305) Source # newNonceMaybe :: Int -> m (Maybe (Nonce ChaCha20Poly1305)) Source # |
Constructors
MkGNonce | |
Fields |
class Encodable (Salt alg) => HasSalt alg where Source #
Methods
saltSpec :: SizeSpecifier (Salt alg) Source #
Constructors
MkGSalt | |
Fields |
Constructors
MkGPassword | |
Fields
|
Instances
Show GPassword Source # | |
Encodable GPassword Source # | |
Defined in Botan.Types.Class | |
Eq GPassword Source # | |
Ord GPassword Source # | |
Constructors
MkGDigest | |
Fields |
data family Ciphertext alg Source #
Instances
class (Eq (Ciphertext alg), Ord (Ciphertext alg), Encodable (Ciphertext alg)) => HasCiphertext alg Source #
Instances
newtype GCiphertext Source #
Constructors
MkGCiphertext | |
Fields |
Instances
Show GCiphertext Source # | |
Defined in Botan.Types.Class Methods showsPrec :: Int -> GCiphertext -> ShowS # show :: GCiphertext -> String # showList :: [GCiphertext] -> ShowS # | |
Encodable GCiphertext Source # | |
Defined in Botan.Types.Class Methods encode :: GCiphertext -> ByteString Source # decode :: ByteString -> Maybe GCiphertext Source # | |
Eq GCiphertext Source # | |
Defined in Botan.Types.Class | |
Ord GCiphertext Source # | |
Defined in Botan.Types.Class Methods 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 #
Minimal complete definition
Nothing
Methods
toStrictCiphertext :: LazyCiphertext alg -> Ciphertext alg Source #
fromStrictCiphertext :: Ciphertext alg -> LazyCiphertext alg Source #
Instances
newtype GLazyCiphertext Source #
Constructors
MkGLazyCiphertext | |
Fields |