| 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.Utility
Description
This module is based on the Utility Functions section of the C Botan FFI documentation.
Synopsis
- constantTimeCompare :: ByteString -> ByteString -> Int -> IO Bool
- scrubMem :: Ptr a -> Int -> IO ()
- data HexEncodingFlags
- hexEncode :: ByteString -> HexEncodingFlags -> IO Text
- hexDecode :: Text -> IO ByteString
- base64Encode :: ByteString -> IO Text
- base64Decode :: Text -> IO ByteString
Documentation
Arguments
| :: ByteString | x |
| -> ByteString | y |
| -> Int | len |
| -> IO Bool |
Returns 0 if x[0..len] == y[0..len], -1 otherwise.
data HexEncodingFlags Source #
Constructors
| HexUpperCase | |
| HexLowerCase |
Arguments
| :: ByteString | x |
| -> HexEncodingFlags | flags |
| -> IO Text | y |
Arguments
| :: ByteString | x |
| -> IO Text | out |
Arguments
| :: Text | base64_str |
| -> IO ByteString | out |