{-# LINE 1 "src/Botan/Bindings/PubKey/KeyAgreement.hsc" #-}
{-# LANGUAGE CApiFFI #-}
module Botan.Bindings.PubKey.KeyAgreement where
import Botan.Bindings.Prelude
import Botan.Bindings.PubKey
import Botan.Bindings.View
data {-# CTYPE "botan/ffi.h" "struct botan_pk_op_ka_struct" #-} BotanPKOpKeyAgreementStruct
newtype {-# CTYPE "botan/ffi.h" "botan_pk_op_ka_t" #-} BotanPKOpKeyAgreement
= MkBotanPKOpKeyAgreement { BotanPKOpKeyAgreement -> Ptr BotanPKOpKeyAgreementStruct
runBotanPKOpKeyAgreement :: Ptr BotanPKOpKeyAgreementStruct }
deriving newtype (BotanPKOpKeyAgreement -> BotanPKOpKeyAgreement -> Bool
(BotanPKOpKeyAgreement -> BotanPKOpKeyAgreement -> Bool)
-> (BotanPKOpKeyAgreement -> BotanPKOpKeyAgreement -> Bool)
-> Eq BotanPKOpKeyAgreement
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BotanPKOpKeyAgreement -> BotanPKOpKeyAgreement -> Bool
== :: BotanPKOpKeyAgreement -> BotanPKOpKeyAgreement -> Bool
$c/= :: BotanPKOpKeyAgreement -> BotanPKOpKeyAgreement -> Bool
/= :: BotanPKOpKeyAgreement -> BotanPKOpKeyAgreement -> Bool
Eq, Eq BotanPKOpKeyAgreement
Eq BotanPKOpKeyAgreement
-> (BotanPKOpKeyAgreement -> BotanPKOpKeyAgreement -> Ordering)
-> (BotanPKOpKeyAgreement -> BotanPKOpKeyAgreement -> Bool)
-> (BotanPKOpKeyAgreement -> BotanPKOpKeyAgreement -> Bool)
-> (BotanPKOpKeyAgreement -> BotanPKOpKeyAgreement -> Bool)
-> (BotanPKOpKeyAgreement -> BotanPKOpKeyAgreement -> Bool)
-> (BotanPKOpKeyAgreement
-> BotanPKOpKeyAgreement -> BotanPKOpKeyAgreement)
-> (BotanPKOpKeyAgreement
-> BotanPKOpKeyAgreement -> BotanPKOpKeyAgreement)
-> Ord BotanPKOpKeyAgreement
BotanPKOpKeyAgreement -> BotanPKOpKeyAgreement -> Bool
BotanPKOpKeyAgreement -> BotanPKOpKeyAgreement -> Ordering
BotanPKOpKeyAgreement
-> BotanPKOpKeyAgreement -> BotanPKOpKeyAgreement
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
$ccompare :: BotanPKOpKeyAgreement -> BotanPKOpKeyAgreement -> Ordering
compare :: BotanPKOpKeyAgreement -> BotanPKOpKeyAgreement -> Ordering
$c< :: BotanPKOpKeyAgreement -> BotanPKOpKeyAgreement -> Bool
< :: BotanPKOpKeyAgreement -> BotanPKOpKeyAgreement -> Bool
$c<= :: BotanPKOpKeyAgreement -> BotanPKOpKeyAgreement -> Bool
<= :: BotanPKOpKeyAgreement -> BotanPKOpKeyAgreement -> Bool
$c> :: BotanPKOpKeyAgreement -> BotanPKOpKeyAgreement -> Bool
> :: BotanPKOpKeyAgreement -> BotanPKOpKeyAgreement -> Bool
$c>= :: BotanPKOpKeyAgreement -> BotanPKOpKeyAgreement -> Bool
>= :: BotanPKOpKeyAgreement -> BotanPKOpKeyAgreement -> Bool
$cmax :: BotanPKOpKeyAgreement
-> BotanPKOpKeyAgreement -> BotanPKOpKeyAgreement
max :: BotanPKOpKeyAgreement
-> BotanPKOpKeyAgreement -> BotanPKOpKeyAgreement
$cmin :: BotanPKOpKeyAgreement
-> BotanPKOpKeyAgreement -> BotanPKOpKeyAgreement
min :: BotanPKOpKeyAgreement
-> BotanPKOpKeyAgreement -> BotanPKOpKeyAgreement
Ord, Ptr BotanPKOpKeyAgreement -> IO BotanPKOpKeyAgreement
Ptr BotanPKOpKeyAgreement -> Int -> IO BotanPKOpKeyAgreement
Ptr BotanPKOpKeyAgreement -> Int -> BotanPKOpKeyAgreement -> IO ()
Ptr BotanPKOpKeyAgreement -> BotanPKOpKeyAgreement -> IO ()
BotanPKOpKeyAgreement -> Int
(BotanPKOpKeyAgreement -> Int)
-> (BotanPKOpKeyAgreement -> Int)
-> (Ptr BotanPKOpKeyAgreement -> Int -> IO BotanPKOpKeyAgreement)
-> (Ptr BotanPKOpKeyAgreement
-> Int -> BotanPKOpKeyAgreement -> IO ())
-> (forall b. Ptr b -> Int -> IO BotanPKOpKeyAgreement)
-> (forall b. Ptr b -> Int -> BotanPKOpKeyAgreement -> IO ())
-> (Ptr BotanPKOpKeyAgreement -> IO BotanPKOpKeyAgreement)
-> (Ptr BotanPKOpKeyAgreement -> BotanPKOpKeyAgreement -> IO ())
-> Storable BotanPKOpKeyAgreement
forall b. Ptr b -> Int -> IO BotanPKOpKeyAgreement
forall b. Ptr b -> Int -> BotanPKOpKeyAgreement -> IO ()
forall a.
(a -> Int)
-> (a -> Int)
-> (Ptr a -> Int -> IO a)
-> (Ptr a -> Int -> a -> IO ())
-> (forall b. Ptr b -> Int -> IO a)
-> (forall b. Ptr b -> Int -> a -> IO ())
-> (Ptr a -> IO a)
-> (Ptr a -> a -> IO ())
-> Storable a
$csizeOf :: BotanPKOpKeyAgreement -> Int
sizeOf :: BotanPKOpKeyAgreement -> Int
$calignment :: BotanPKOpKeyAgreement -> Int
alignment :: BotanPKOpKeyAgreement -> Int
$cpeekElemOff :: Ptr BotanPKOpKeyAgreement -> Int -> IO BotanPKOpKeyAgreement
peekElemOff :: Ptr BotanPKOpKeyAgreement -> Int -> IO BotanPKOpKeyAgreement
$cpokeElemOff :: Ptr BotanPKOpKeyAgreement -> Int -> BotanPKOpKeyAgreement -> IO ()
pokeElemOff :: Ptr BotanPKOpKeyAgreement -> Int -> BotanPKOpKeyAgreement -> IO ()
$cpeekByteOff :: forall b. Ptr b -> Int -> IO BotanPKOpKeyAgreement
peekByteOff :: forall b. Ptr b -> Int -> IO BotanPKOpKeyAgreement
$cpokeByteOff :: forall b. Ptr b -> Int -> BotanPKOpKeyAgreement -> IO ()
pokeByteOff :: forall b. Ptr b -> Int -> BotanPKOpKeyAgreement -> IO ()
$cpeek :: Ptr BotanPKOpKeyAgreement -> IO BotanPKOpKeyAgreement
peek :: Ptr BotanPKOpKeyAgreement -> IO BotanPKOpKeyAgreement
$cpoke :: Ptr BotanPKOpKeyAgreement -> BotanPKOpKeyAgreement -> IO ()
poke :: Ptr BotanPKOpKeyAgreement -> BotanPKOpKeyAgreement -> IO ()
Storable)
foreign import capi safe "botan/ffi.h &botan_pk_op_key_agreement_destroy"
botan_pk_op_key_agreement_destroy
:: FinalizerPtr BotanPKOpKeyAgreementStruct
pattern BOTAN_PUBKEY_KEY_AGREEMENT_FLAGS_NONE
:: (Eq a, Num a) => a
pattern $mBOTAN_PUBKEY_KEY_AGREEMENT_FLAGS_NONE :: forall {r} {a}.
(Eq a, Num a) =>
a -> ((# #) -> r) -> ((# #) -> r) -> r
$bBOTAN_PUBKEY_KEY_AGREEMENT_FLAGS_NONE :: forall a. (Eq a, Num a) => a
BOTAN_PUBKEY_KEY_AGREEMENT_FLAGS_NONE = 0
foreign import capi safe "botan/ffi.h botan_pk_op_key_agreement_create"
botan_pk_op_key_agreement_create
:: Ptr BotanPKOpKeyAgreement
-> BotanPrivKey
-> ConstPtr CChar
-> Word32
-> IO CInt
foreign import capi safe "botan/ffi.h botan_pk_op_key_agreement_export_public"
botan_pk_op_key_agreement_export_public
:: BotanPrivKey
-> Ptr Word8
-> Ptr CSize
-> IO CInt
foreign import capi safe "botan/ffi.h botan_pk_op_key_agreement_view_public"
botan_pk_op_key_agreement_view_public
:: BotanPrivKey
-> BotanViewContext ctx
-> FunPtr (BotanViewBinCallback ctx)
-> IO CInt
foreign import capi safe "botan/ffi.h botan_pk_op_key_agreement_size"
botan_pk_op_key_agreement_size
:: BotanPKOpKeyAgreement
-> Ptr CSize
-> IO CInt
foreign import capi safe "botan/ffi.h botan_pk_op_key_agreement"
botan_pk_op_key_agreement
:: BotanPKOpKeyAgreement
-> Ptr Word8
-> Ptr CSize
-> ConstPtr Word8
-> CSize
-> ConstPtr Word8
-> CSize
-> IO CInt