| 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 | Safe-Inferred |
| Language | GHC2021 |
Botan.Low.View
Contents
Description
This module is based on the View Functions section of the C Botan FFI documentation.
Synopsis
- type BotanViewBinFn ctx = BotanViewContext ctx -> ConstPtr Word8 -> CSize -> CInt
- type BotanViewBinCallback ctx = FunPtr (BotanViewBinFn ctx)
- viewBin :: BotanViewBinFn ctx -> (BotanViewBinCallback ctx -> IO a) -> IO a
- type BotanViewStrFn ctx = BotanViewContext ctx -> ConstPtr CChar -> CSize -> CInt
- type BotanViewStrCallback ctx = FunPtr (BotanViewStrFn ctx)
- viewStr :: BotanViewStrFn ctx -> (BotanViewStrCallback ctx -> IO a) -> IO a
View binary
type BotanViewBinFn ctx Source #
Arguments
| = BotanViewContext ctx | view_ctx: some application context |
| -> ConstPtr Word8 | data: the binary data |
| -> CSize | len: the length of data in bytes |
| -> CInt |
type BotanViewBinCallback ctx = FunPtr (BotanViewBinFn ctx) Source #
viewBin :: BotanViewBinFn ctx -> (BotanViewBinCallback ctx -> IO a) -> IO a Source #
View string
type BotanViewStrFn ctx Source #
Arguments
| = BotanViewContext ctx | view_ctx: some application context |
| -> ConstPtr CChar | str: the null terminated string |
| -> CSize | len: the length of string *including* the null terminator |
| -> CInt |
type BotanViewStrCallback ctx = FunPtr (BotanViewStrFn ctx) Source #
viewStr :: BotanViewStrFn ctx -> (BotanViewStrCallback ctx -> IO a) -> IO a Source #