{-# LANGUAGE CApiFFI #-}
module Botan.Bindings.SRP6 where
import Botan.Bindings.Prelude
import Botan.Bindings.RNG
data {-# CTYPE "botan/ffi.h" "struct botan_srp6_server_session_struct" #-} BotanSRP6ServerSessionStruct
newtype {-# CTYPE "botan/ffi.h" "botan_srp6_server_session_t" #-} BotanSRP6ServerSession
= MkBotanSRP6ServerSession { BotanSRP6ServerSession -> Ptr BotanSRP6ServerSessionStruct
runBotanSRP6ServerSession :: Ptr BotanSRP6ServerSessionStruct }
deriving newtype (BotanSRP6ServerSession -> BotanSRP6ServerSession -> Bool
(BotanSRP6ServerSession -> BotanSRP6ServerSession -> Bool)
-> (BotanSRP6ServerSession -> BotanSRP6ServerSession -> Bool)
-> Eq BotanSRP6ServerSession
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BotanSRP6ServerSession -> BotanSRP6ServerSession -> Bool
== :: BotanSRP6ServerSession -> BotanSRP6ServerSession -> Bool
$c/= :: BotanSRP6ServerSession -> BotanSRP6ServerSession -> Bool
/= :: BotanSRP6ServerSession -> BotanSRP6ServerSession -> Bool
Eq, Eq BotanSRP6ServerSession
Eq BotanSRP6ServerSession
-> (BotanSRP6ServerSession -> BotanSRP6ServerSession -> Ordering)
-> (BotanSRP6ServerSession -> BotanSRP6ServerSession -> Bool)
-> (BotanSRP6ServerSession -> BotanSRP6ServerSession -> Bool)
-> (BotanSRP6ServerSession -> BotanSRP6ServerSession -> Bool)
-> (BotanSRP6ServerSession -> BotanSRP6ServerSession -> Bool)
-> (BotanSRP6ServerSession
-> BotanSRP6ServerSession -> BotanSRP6ServerSession)
-> (BotanSRP6ServerSession
-> BotanSRP6ServerSession -> BotanSRP6ServerSession)
-> Ord BotanSRP6ServerSession
BotanSRP6ServerSession -> BotanSRP6ServerSession -> Bool
BotanSRP6ServerSession -> BotanSRP6ServerSession -> Ordering
BotanSRP6ServerSession
-> BotanSRP6ServerSession -> BotanSRP6ServerSession
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 :: BotanSRP6ServerSession -> BotanSRP6ServerSession -> Ordering
compare :: BotanSRP6ServerSession -> BotanSRP6ServerSession -> Ordering
$c< :: BotanSRP6ServerSession -> BotanSRP6ServerSession -> Bool
< :: BotanSRP6ServerSession -> BotanSRP6ServerSession -> Bool
$c<= :: BotanSRP6ServerSession -> BotanSRP6ServerSession -> Bool
<= :: BotanSRP6ServerSession -> BotanSRP6ServerSession -> Bool
$c> :: BotanSRP6ServerSession -> BotanSRP6ServerSession -> Bool
> :: BotanSRP6ServerSession -> BotanSRP6ServerSession -> Bool
$c>= :: BotanSRP6ServerSession -> BotanSRP6ServerSession -> Bool
>= :: BotanSRP6ServerSession -> BotanSRP6ServerSession -> Bool
$cmax :: BotanSRP6ServerSession
-> BotanSRP6ServerSession -> BotanSRP6ServerSession
max :: BotanSRP6ServerSession
-> BotanSRP6ServerSession -> BotanSRP6ServerSession
$cmin :: BotanSRP6ServerSession
-> BotanSRP6ServerSession -> BotanSRP6ServerSession
min :: BotanSRP6ServerSession
-> BotanSRP6ServerSession -> BotanSRP6ServerSession
Ord, Ptr BotanSRP6ServerSession -> IO BotanSRP6ServerSession
Ptr BotanSRP6ServerSession -> Int -> IO BotanSRP6ServerSession
Ptr BotanSRP6ServerSession
-> Int -> BotanSRP6ServerSession -> IO ()
Ptr BotanSRP6ServerSession -> BotanSRP6ServerSession -> IO ()
BotanSRP6ServerSession -> Int
(BotanSRP6ServerSession -> Int)
-> (BotanSRP6ServerSession -> Int)
-> (Ptr BotanSRP6ServerSession -> Int -> IO BotanSRP6ServerSession)
-> (Ptr BotanSRP6ServerSession
-> Int -> BotanSRP6ServerSession -> IO ())
-> (forall b. Ptr b -> Int -> IO BotanSRP6ServerSession)
-> (forall b. Ptr b -> Int -> BotanSRP6ServerSession -> IO ())
-> (Ptr BotanSRP6ServerSession -> IO BotanSRP6ServerSession)
-> (Ptr BotanSRP6ServerSession -> BotanSRP6ServerSession -> IO ())
-> Storable BotanSRP6ServerSession
forall b. Ptr b -> Int -> IO BotanSRP6ServerSession
forall b. Ptr b -> Int -> BotanSRP6ServerSession -> 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 :: BotanSRP6ServerSession -> Int
sizeOf :: BotanSRP6ServerSession -> Int
$calignment :: BotanSRP6ServerSession -> Int
alignment :: BotanSRP6ServerSession -> Int
$cpeekElemOff :: Ptr BotanSRP6ServerSession -> Int -> IO BotanSRP6ServerSession
peekElemOff :: Ptr BotanSRP6ServerSession -> Int -> IO BotanSRP6ServerSession
$cpokeElemOff :: Ptr BotanSRP6ServerSession
-> Int -> BotanSRP6ServerSession -> IO ()
pokeElemOff :: Ptr BotanSRP6ServerSession
-> Int -> BotanSRP6ServerSession -> IO ()
$cpeekByteOff :: forall b. Ptr b -> Int -> IO BotanSRP6ServerSession
peekByteOff :: forall b. Ptr b -> Int -> IO BotanSRP6ServerSession
$cpokeByteOff :: forall b. Ptr b -> Int -> BotanSRP6ServerSession -> IO ()
pokeByteOff :: forall b. Ptr b -> Int -> BotanSRP6ServerSession -> IO ()
$cpeek :: Ptr BotanSRP6ServerSession -> IO BotanSRP6ServerSession
peek :: Ptr BotanSRP6ServerSession -> IO BotanSRP6ServerSession
$cpoke :: Ptr BotanSRP6ServerSession -> BotanSRP6ServerSession -> IO ()
poke :: Ptr BotanSRP6ServerSession -> BotanSRP6ServerSession -> IO ()
Storable)
foreign import capi safe "botan/ffi.h &botan_srp6_server_session_destroy"
botan_srp6_server_session_destroy
:: FinalizerPtr BotanSRP6ServerSessionStruct
foreign import capi safe "botan/ffi.h botan_srp6_server_session_init"
botan_srp6_server_session_init
:: Ptr BotanSRP6ServerSession
-> IO CInt
foreign import capi safe "botan/ffi.h botan_srp6_server_session_step1"
botan_srp6_server_session_step1
:: BotanSRP6ServerSession
-> ConstPtr Word8
-> CSize
-> ConstPtr CChar
-> ConstPtr CChar
-> BotanRNG
-> Ptr Word8
-> Ptr CSize
-> IO CInt
foreign import capi safe "botan/ffi.h botan_srp6_server_session_step2"
botan_srp6_server_session_step2
:: BotanSRP6ServerSession
-> ConstPtr Word8
-> CSize
-> Ptr Word8
-> Ptr CSize
-> IO CInt
foreign import capi safe "botan/ffi.h botan_srp6_generate_verifier"
botan_srp6_generate_verifier
:: ConstPtr CChar
-> ConstPtr CChar
-> ConstPtr Word8
-> CSize
-> ConstPtr CChar
-> ConstPtr CChar
-> Ptr Word8
-> Ptr CSize
-> IO CInt
foreign import capi safe "botan/ffi.h botan_srp6_client_agree"
botan_srp6_client_agree
:: ConstPtr CChar
-> ConstPtr CChar
-> ConstPtr CChar
-> ConstPtr CChar
-> ConstPtr Word8
-> CSize
-> ConstPtr Word8
-> CSize
-> BotanRNG
-> Ptr Word8
-> Ptr CSize
-> Ptr Word8
-> Ptr CSize
-> IO CInt
foreign import capi safe "botan/ffi.h botan_srp6_group_size"
botan_srp6_group_size
:: ConstPtr CChar
-> Ptr CSize
-> IO CInt