Z-Botan-0.3.1.0: Crypto for Haskell
Copyright(c) Dong Han 2020 - 2021
LicenseBSD
Maintainerwinterland1989@gmail.com
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Z.Botan.FFI

Description

INTERNAL MODULE, provides all botan FFI defs.

Synopsis

Documentation

type BotanStruct = CPtr () Source #

Internal type to representation botan struct, botan_xxx_t is always pointer type.

newBotanStruct Source #

Arguments

:: HasCallStack 
=> (MBA# BotanStructT -> IO CInt)

init function

-> FunPtr (BotanStructT -> IO a)

destroy function pointer

-> IO BotanStruct 

newBotanStruct' Source #

Arguments

:: HasCallStack 
=> (Ptr BotanStructT -> IO CInt)

init function

-> FunPtr (BotanStructT -> IO a)

destroy function pointer

-> IO BotanStruct 

botan_block_cipher_get_keyspec Source #

Arguments

:: BotanStructT 
-> MBA# Int

minimum_keylength

-> MBA# Int

maximum_keylength

-> MBA# Int

keylength_modulo

-> IO CInt 

hs_botan_block_cipher_encrypt_blocks Source #

Arguments

:: BotanStructT 
-> BA# Word8

in_buf

-> Int

in offset

-> MBA# Word8

out buffer

-> Int

number of block

-> IO CInt 

hs_botan_block_cipher_decrypt_blocks Source #

Arguments

:: BotanStructT 
-> BA# Word8

in_buf

-> Int

in offset

-> MBA# Word8

out buffer

-> Int

number of block

-> IO CInt 

data CipherDirection Source #

Instances

Instances details
Eq CipherDirection Source # 
Instance details

Defined in Z.Botan.FFI

Ord CipherDirection Source # 
Instance details

Defined in Z.Botan.FFI

Show CipherDirection Source # 
Instance details

Defined in Z.Botan.FFI

Generic CipherDirection Source # 
Instance details

Defined in Z.Botan.FFI

Associated Types

type Rep CipherDirection :: Type -> Type #

JSON CipherDirection Source # 
Instance details

Defined in Z.Botan.FFI

Print CipherDirection Source # 
Instance details

Defined in Z.Botan.FFI

type Rep CipherDirection Source # 
Instance details

Defined in Z.Botan.FFI

type Rep CipherDirection = D1 ('MetaData "CipherDirection" "Z.Botan.FFI" "Z-Botan-0.3.1.0-GbapUVQUdq6A2uFR3TMVx6" 'False) (C1 ('MetaCons "CipherEncrypt" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CipherDecrypt" 'PrefixI 'False) (U1 :: Type -> Type))

botan_cipher_get_keyspec Source #

Arguments

:: BotanStructT 
-> MBA# Int

minimum_keylength

-> MBA# Int

maximum_keylength

-> MBA# Int

keylength_modulo

-> IO CInt 

hs_botan_cipher_update Source #

Arguments

:: BotanStructT 
-> MBA# Word8

output

-> BA# Word8

input

-> Int

input offset

-> Int

input len

-> IO Int

output written

hs_botan_cipher_finish Source #

Arguments

:: BotanStructT 
-> MBA# Word8

output

-> Int

output size

-> BA# Word8

input

-> Int

input offset

-> Int

input len

-> IO Int

output written

hs_botan_pwdhash Source #

Arguments

:: BA# Word8 
-> Int 
-> Int 
-> Int 
-> MBA# Word8 
-> Int

output

-> BA# Word8 
-> Int

passphrase

-> BA# Word8 
-> Int 
-> Int

salt

-> IO CInt 

hs_botan_pwdhash_timed Source #

Arguments

:: BA# Word8 
-> Int 
-> MBA# Word8 
-> Int

output

-> BA# Word8 
-> Int

passphrase

-> BA# Word8 
-> Int 
-> Int

salt

-> IO CInt 

hs_botan_pwdhash_timed_safe Source #

Arguments

:: Ptr Word8 
-> Int 
-> Ptr Word8 
-> Int

output

-> Ptr Word8 
-> Int

passphrase

-> Ptr Word8 
-> Int 
-> Int

salt

-> IO CInt 

hs_botan_kdf :: BA# Word8 -> MBA# Word8 -> Int -> BA# Word8 -> Int -> Int -> BA# Word8 -> Int -> Int -> BA# Word8 -> Int -> Int -> IO CInt Source #

botan_privkey_create Source #

Arguments

:: Ptr BotanStructT

botan_privkey_t* key

-> Ptr Word8

const char* algo_name

-> Ptr Word8

const char* algo_params

-> BotanStructT

botan_rng_t rng

-> IO CInt 

botan_privkey_export Source #

Arguments

:: BotanStructT

botan_privkey_t key

-> MBA# Word8 
-> MBA# CSize

uint8_t out[], size_t* out_len

-> Word32

uint32_t flags

-> IO CInt 

botan_privkey_export_encrypted Source #

Arguments

:: BotanStructT

botan_privkey_t key

-> MBA# Word8 
-> MBA# CSize

uint8_t out[], size_t* out_len

-> BotanStructT

botan_rng_t

-> BA# Word8

passphrase

-> BA# Word8

encryption_algo, currently ignored by botan

-> Word32

uint32_t flags

-> IO CInt 

botan_privkey_get_field Source #

Arguments

:: BotanStructT

botan_mp_t output

-> BotanStructT

botan_privkey_t key

-> BA# Word8

const char* field_name

-> IO CInt 

hs_botan_pubkey_load Source #

Arguments

:: MBA# BotanStructT

botan_pubkey_t* key

-> BA# Word8 
-> Int 
-> Int 
-> IO CInt 

type KeyUsageConstraint = CUInt Source #

Certificate key usage constraints.

hs_botan_x509_cert_load Source #

Arguments

:: MBA# BotanStructT

botan_x509_cert_t* cert_obj

-> BA# Word8 
-> Int 
-> Int 
-> IO CInt