{-# LANGUAGE CApiFFI #-}
module Botan.Bindings.TOTP where
import Botan.Bindings.Prelude
data {-# CTYPE "botan/ffi.h" "struct botan_totp_struct" #-} BotanTOTPStruct
newtype {-# CTYPE "botan/ffi.h" "botan_totp_t" #-} BotanTOTP
= MkBotanTOTP { BotanTOTP -> Ptr BotanTOTPStruct
runBotanTOTP :: Ptr BotanTOTPStruct }
deriving newtype (BotanTOTP -> BotanTOTP -> Bool
(BotanTOTP -> BotanTOTP -> Bool)
-> (BotanTOTP -> BotanTOTP -> Bool) -> Eq BotanTOTP
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: BotanTOTP -> BotanTOTP -> Bool
== :: BotanTOTP -> BotanTOTP -> Bool
$c/= :: BotanTOTP -> BotanTOTP -> Bool
/= :: BotanTOTP -> BotanTOTP -> Bool
Eq, Eq BotanTOTP
Eq BotanTOTP
-> (BotanTOTP -> BotanTOTP -> Ordering)
-> (BotanTOTP -> BotanTOTP -> Bool)
-> (BotanTOTP -> BotanTOTP -> Bool)
-> (BotanTOTP -> BotanTOTP -> Bool)
-> (BotanTOTP -> BotanTOTP -> Bool)
-> (BotanTOTP -> BotanTOTP -> BotanTOTP)
-> (BotanTOTP -> BotanTOTP -> BotanTOTP)
-> Ord BotanTOTP
BotanTOTP -> BotanTOTP -> Bool
BotanTOTP -> BotanTOTP -> Ordering
BotanTOTP -> BotanTOTP -> BotanTOTP
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 :: BotanTOTP -> BotanTOTP -> Ordering
compare :: BotanTOTP -> BotanTOTP -> Ordering
$c< :: BotanTOTP -> BotanTOTP -> Bool
< :: BotanTOTP -> BotanTOTP -> Bool
$c<= :: BotanTOTP -> BotanTOTP -> Bool
<= :: BotanTOTP -> BotanTOTP -> Bool
$c> :: BotanTOTP -> BotanTOTP -> Bool
> :: BotanTOTP -> BotanTOTP -> Bool
$c>= :: BotanTOTP -> BotanTOTP -> Bool
>= :: BotanTOTP -> BotanTOTP -> Bool
$cmax :: BotanTOTP -> BotanTOTP -> BotanTOTP
max :: BotanTOTP -> BotanTOTP -> BotanTOTP
$cmin :: BotanTOTP -> BotanTOTP -> BotanTOTP
min :: BotanTOTP -> BotanTOTP -> BotanTOTP
Ord, Ptr BotanTOTP -> IO BotanTOTP
Ptr BotanTOTP -> Int -> IO BotanTOTP
Ptr BotanTOTP -> Int -> BotanTOTP -> IO ()
Ptr BotanTOTP -> BotanTOTP -> IO ()
BotanTOTP -> Int
(BotanTOTP -> Int)
-> (BotanTOTP -> Int)
-> (Ptr BotanTOTP -> Int -> IO BotanTOTP)
-> (Ptr BotanTOTP -> Int -> BotanTOTP -> IO ())
-> (forall b. Ptr b -> Int -> IO BotanTOTP)
-> (forall b. Ptr b -> Int -> BotanTOTP -> IO ())
-> (Ptr BotanTOTP -> IO BotanTOTP)
-> (Ptr BotanTOTP -> BotanTOTP -> IO ())
-> Storable BotanTOTP
forall b. Ptr b -> Int -> IO BotanTOTP
forall b. Ptr b -> Int -> BotanTOTP -> 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 :: BotanTOTP -> Int
sizeOf :: BotanTOTP -> Int
$calignment :: BotanTOTP -> Int
alignment :: BotanTOTP -> Int
$cpeekElemOff :: Ptr BotanTOTP -> Int -> IO BotanTOTP
peekElemOff :: Ptr BotanTOTP -> Int -> IO BotanTOTP
$cpokeElemOff :: Ptr BotanTOTP -> Int -> BotanTOTP -> IO ()
pokeElemOff :: Ptr BotanTOTP -> Int -> BotanTOTP -> IO ()
$cpeekByteOff :: forall b. Ptr b -> Int -> IO BotanTOTP
peekByteOff :: forall b. Ptr b -> Int -> IO BotanTOTP
$cpokeByteOff :: forall b. Ptr b -> Int -> BotanTOTP -> IO ()
pokeByteOff :: forall b. Ptr b -> Int -> BotanTOTP -> IO ()
$cpeek :: Ptr BotanTOTP -> IO BotanTOTP
peek :: Ptr BotanTOTP -> IO BotanTOTP
$cpoke :: Ptr BotanTOTP -> BotanTOTP -> IO ()
poke :: Ptr BotanTOTP -> BotanTOTP -> IO ()
Storable)
foreign import capi safe "botan/ffi.h &botan_totp_destroy"
botan_totp_destroy
:: FinalizerPtr BotanTOTPStruct
foreign import capi safe "botan/ffi.h botan_totp_init"
botan_totp_init
:: Ptr BotanTOTP
-> ConstPtr Word8
-> CSize
-> ConstPtr CChar
-> CSize
-> CSize
-> IO CInt
foreign import capi safe "botan/ffi.h botan_totp_generate"
botan_totp_generate
:: BotanTOTP
-> Ptr Word32
-> Word64
-> IO CInt
foreign import capi safe "botan/ffi.h botan_totp_check"
botan_totp_check
:: BotanTOTP
-> Word32
-> Word64
-> CSize
-> IO CInt