| Copyright | (c) 2023-2024 Apotheca Labs (c) 2024-2025 Haskell Foundation |
|---|---|
| License | BSD-3-Clause |
| Maintainer | joris@well-typed.com, leo@apotheca.io |
| Stability | experimental |
| Portability | POSIX |
| Safe Haskell | None |
| Language | GHC2021 |
Botan.Bindings.Utility
Description
This module is based on the Utility Functions section of the C Botan FFI documentation.
Synopsis
- botan_constant_time_compare :: ConstPtr Word8 -> ConstPtr Word8 -> CSize -> IO CInt
- botan_scrub_mem :: Ptr a -> CSize -> IO CInt
- pattern BOTAN_FFI_HEX_UPPER_CASE :: (Eq a, Num a) => a
- pattern BOTAN_FFI_HEX_LOWER_CASE :: (Eq a, Num a) => a
- botan_hex_encode :: ConstPtr Word8 -> CSize -> Ptr CChar -> Word32 -> IO CInt
- botan_hex_decode :: ConstPtr CChar -> CSize -> Ptr Word8 -> Ptr CSize -> IO CInt
- botan_base64_encode :: ConstPtr Word8 -> CSize -> Ptr CChar -> Ptr CSize -> IO CInt
- botan_base64_decode :: ConstPtr CChar -> CSize -> Ptr Word8 -> Ptr CSize -> IO CInt
Documentation
botan_constant_time_compare Source #
Returns 0 if x[0..len] == y[0..len], -1 otherwise.
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 #
Arguments
| :: ConstPtr Word8 | x |
| -> CSize | len |
| -> Ptr CChar | y |
| -> Word32 | flags |
| -> IO CInt |
Arguments
| :: ConstPtr CChar | hex_str |
| -> CSize | in_len |
| -> Ptr Word8 | out |
| -> Ptr CSize | out_len |
| -> IO CInt |
Arguments
| :: ConstPtr Word8 | x |
| -> CSize | len |
| -> Ptr CChar | out |
| -> Ptr CSize | out_len |
| -> IO CInt |
Arguments
| :: ConstPtr CChar | base64_str |
| -> CSize | in_len |
| -> Ptr Word8 | out |
| -> Ptr CSize | out_len |
| -> IO CInt |