botan-bindings
Copyright(c) 2023-2024 Apotheca Labs
(c) 2024-2025 Haskell Foundation
LicenseBSD-3-Clause
Maintainerjoris@well-typed.com, leo@apotheca.io
Stabilityexperimental
PortabilityPOSIX
Safe HaskellSafe-Inferred
LanguageGHC2021

Botan.Bindings.Utility

Description

This module is based on the Utility Functions section of the C Botan FFI documentation.

Synopsis

Documentation

botan_constant_time_compare Source #

Arguments

:: ConstPtr Word8

x

-> ConstPtr Word8

y

-> CSize

len

-> IO CInt 

Returns 0 if x[0..len] == y[0..len], -1 otherwise.

botan_scrub_mem Source #

Arguments

:: Ptr a

mem

-> CSize

bytes

-> IO CInt 

pattern BOTAN_FFI_HEX_UPPER_CASE :: (Eq a, Num a) => a Source #

pattern BOTAN_FFI_HEX_LOWER_CASE :: (Eq a, Num a) => a Source #

botan_hex_encode Source #

Arguments

:: ConstPtr Word8

x

-> CSize

len

-> Ptr CChar

y

-> Word32

flags

-> IO CInt 

botan_hex_decode Source #

Arguments

:: ConstPtr CChar

hex_str

-> CSize

in_len

-> Ptr Word8

out

-> Ptr CSize

out_len

-> IO CInt 

botan_base64_encode Source #

Arguments

:: ConstPtr Word8

x

-> CSize

len

-> Ptr CChar

out

-> Ptr CSize

out_len

-> IO CInt 

botan_base64_decode Source #

Arguments

:: ConstPtr CChar

base64_str

-> CSize

in_len

-> Ptr Word8

out

-> Ptr CSize

out_len

-> IO CInt