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

Botan.Low.Utility

Description

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

Synopsis

Documentation

constantTimeCompare Source #

Arguments

:: ByteString

x

-> ByteString

y

-> Int

len

-> IO Bool 

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

scrubMem Source #

Arguments

:: Ptr a

mem

-> Int

bytes

-> IO () 

hexEncode Source #

Arguments

:: ByteString

x

-> HexEncodingFlags

flags

-> IO Text

y

hexDecode Source #

Arguments

:: Text

hex_str

-> IO ByteString

out

base64Encode Source #

Arguments

:: ByteString

x

-> IO Text

out

base64Decode Source #

Arguments

:: Text

base64_str

-> IO ByteString

out