{-# LANGUAGE CApiFFI #-}
module Botan.Bindings.HOTP where
import Botan.Bindings.Prelude
data {-# CTYPE "botan/ffi.h" "struct botan_hotp_struct" #-} BotanHOTPStruct
newtype {-# CTYPE "botan/ffi.h" "botan_hotp_t" #-} BotanHOTP
= MkBotanHOTP { BotanHOTP -> Ptr BotanHOTPStruct
runBotanHOTP :: Ptr BotanHOTPStruct }
deriving newtype (BotanHOTP -> BotanHOTP -> Bool
(BotanHOTP -> BotanHOTP -> Bool)
-> (BotanHOTP -> BotanHOTP -> Bool) -> Eq BotanHOTP
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BotanHOTP -> BotanHOTP -> Bool
== :: BotanHOTP -> BotanHOTP -> Bool
$c/= :: BotanHOTP -> BotanHOTP -> Bool
/= :: BotanHOTP -> BotanHOTP -> Bool
Eq, Eq BotanHOTP
Eq BotanHOTP
-> (BotanHOTP -> BotanHOTP -> Ordering)
-> (BotanHOTP -> BotanHOTP -> Bool)
-> (BotanHOTP -> BotanHOTP -> Bool)
-> (BotanHOTP -> BotanHOTP -> Bool)
-> (BotanHOTP -> BotanHOTP -> Bool)
-> (BotanHOTP -> BotanHOTP -> BotanHOTP)
-> (BotanHOTP -> BotanHOTP -> BotanHOTP)
-> Ord BotanHOTP
BotanHOTP -> BotanHOTP -> Bool
BotanHOTP -> BotanHOTP -> Ordering
BotanHOTP -> BotanHOTP -> BotanHOTP
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 :: BotanHOTP -> BotanHOTP -> Ordering
compare :: BotanHOTP -> BotanHOTP -> Ordering
$c< :: BotanHOTP -> BotanHOTP -> Bool
< :: BotanHOTP -> BotanHOTP -> Bool
$c<= :: BotanHOTP -> BotanHOTP -> Bool
<= :: BotanHOTP -> BotanHOTP -> Bool
$c> :: BotanHOTP -> BotanHOTP -> Bool
> :: BotanHOTP -> BotanHOTP -> Bool
$c>= :: BotanHOTP -> BotanHOTP -> Bool
>= :: BotanHOTP -> BotanHOTP -> Bool
$cmax :: BotanHOTP -> BotanHOTP -> BotanHOTP
max :: BotanHOTP -> BotanHOTP -> BotanHOTP
$cmin :: BotanHOTP -> BotanHOTP -> BotanHOTP
min :: BotanHOTP -> BotanHOTP -> BotanHOTP
Ord, Ptr BotanHOTP -> IO BotanHOTP
Ptr BotanHOTP -> Int -> IO BotanHOTP
Ptr BotanHOTP -> Int -> BotanHOTP -> IO ()
Ptr BotanHOTP -> BotanHOTP -> IO ()
BotanHOTP -> Int
(BotanHOTP -> Int)
-> (BotanHOTP -> Int)
-> (Ptr BotanHOTP -> Int -> IO BotanHOTP)
-> (Ptr BotanHOTP -> Int -> BotanHOTP -> IO ())
-> (forall b. Ptr b -> Int -> IO BotanHOTP)
-> (forall b. Ptr b -> Int -> BotanHOTP -> IO ())
-> (Ptr BotanHOTP -> IO BotanHOTP)
-> (Ptr BotanHOTP -> BotanHOTP -> IO ())
-> Storable BotanHOTP
forall b. Ptr b -> Int -> IO BotanHOTP
forall b. Ptr b -> Int -> BotanHOTP -> 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 :: BotanHOTP -> Int
sizeOf :: BotanHOTP -> Int
$calignment :: BotanHOTP -> Int
alignment :: BotanHOTP -> Int
$cpeekElemOff :: Ptr BotanHOTP -> Int -> IO BotanHOTP
peekElemOff :: Ptr BotanHOTP -> Int -> IO BotanHOTP
$cpokeElemOff :: Ptr BotanHOTP -> Int -> BotanHOTP -> IO ()
pokeElemOff :: Ptr BotanHOTP -> Int -> BotanHOTP -> IO ()
$cpeekByteOff :: forall b. Ptr b -> Int -> IO BotanHOTP
peekByteOff :: forall b. Ptr b -> Int -> IO BotanHOTP
$cpokeByteOff :: forall b. Ptr b -> Int -> BotanHOTP -> IO ()
pokeByteOff :: forall b. Ptr b -> Int -> BotanHOTP -> IO ()
$cpeek :: Ptr BotanHOTP -> IO BotanHOTP
peek :: Ptr BotanHOTP -> IO BotanHOTP
$cpoke :: Ptr BotanHOTP -> BotanHOTP -> IO ()
poke :: Ptr BotanHOTP -> BotanHOTP -> IO ()
Storable)
foreign import capi safe "botan/ffi.h &botan_hotp_destroy"
botan_hotp_destroy
:: FinalizerPtr BotanHOTPStruct
foreign import capi safe "botan/ffi.h botan_hotp_init"
botan_hotp_init
:: Ptr BotanHOTP
-> ConstPtr Word8
-> CSize
-> ConstPtr CChar
-> CSize
-> IO CInt
foreign import capi safe "botan/ffi.h botan_hotp_generate"
botan_hotp_generate
:: BotanHOTP
-> Ptr Word32
-> Word64
-> IO CInt
foreign import capi safe "botan/ffi.h botan_hotp_check"
botan_hotp_check
:: BotanHOTP
-> Ptr Word64
-> Word32
-> Word64
-> CSize
-> IO CInt