module Botan.KeySpec where
import Botan.Prelude
import Botan.RNG
import Botan.Types.Class
type KeySpec = SizeSpecifier ()
keySpec :: Int -> Int -> Int -> KeySpec
keySpec :: Int -> Int -> Int -> KeySpec
keySpec = Int -> Int -> Int -> KeySpec
forall a. Int -> Int -> Int -> SizeSpecifier a
sizeSpec
monoMapKeySpec :: (Int -> Int) -> KeySpec -> KeySpec
monoMapKeySpec :: (Int -> Int) -> KeySpec -> KeySpec
monoMapKeySpec = (Int -> Int) -> KeySpec -> KeySpec
forall a. (Int -> Int) -> SizeSpecifier a -> SizeSpecifier a
monoMapSizes
minKeySize :: KeySpec -> Int
minKeySize :: KeySpec -> Int
minKeySize = KeySpec -> Int
forall a. SizeSpecifier a -> Int
minSize
maxKeySize :: KeySpec -> Int
maxKeySize :: KeySpec -> Int
maxKeySize = KeySpec -> Int
forall a. SizeSpecifier a -> Int
maxSize
keySizes :: KeySpec -> [Int]
keySizes :: KeySpec -> [Int]
keySizes = KeySpec -> [Int]
forall a. SizeSpecifier a -> [Int]
allSizes
validKeySize :: KeySpec -> Int
validKeySize :: KeySpec -> Int
validKeySize = KeySpec -> Int
forall a. SizeSpecifier a -> Int
defaultSize
keySizeIsValid :: Int -> KeySpec -> Bool
keySizeIsValid :: Int -> KeySpec -> Bool
keySizeIsValid = (KeySpec -> Int -> Bool) -> Int -> KeySpec -> Bool
forall a b c. (a -> b -> c) -> b -> a -> c
flip KeySpec -> Int -> Bool
forall a. SizeSpecifier a -> Int -> Bool
sizeIsValid
newKeyMaybe :: (MonadRandomIO m) => Int -> KeySpec -> m (Maybe ByteString)
newKeyMaybe :: forall (m :: * -> *).
MonadRandomIO m =>
Int -> KeySpec -> m (Maybe ByteString)
newKeyMaybe = (KeySpec -> Int -> m (Maybe ByteString))
-> Int -> KeySpec -> m (Maybe ByteString)
forall a b c. (a -> b -> c) -> b -> a -> c
flip KeySpec -> Int -> m (Maybe ByteString)
forall (m :: * -> *) a.
MonadRandomIO m =>
SizeSpecifier a -> Int -> m (Maybe ByteString)
newSizedMaybe
newKey :: (MonadRandomIO m) => KeySpec -> m ByteString
newKey :: forall (m :: * -> *). MonadRandomIO m => KeySpec -> m ByteString
newKey = KeySpec -> m ByteString
forall (m :: * -> *) a.
MonadRandomIO m =>
SizeSpecifier a -> m ByteString
newSized