cardano-crypto-class-2.0.0.0.0.0.0.2: Type classes abstracting over cryptography primitives for Cardano
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Crypto.Libsodium.Memory.Internal

Synopsis

High-level memory management

newtype MLockedForeignPtr a Source #

Foreign pointer to securely allocated memory.

Constructors

SFP 

withMLockedForeignPtr :: forall a b. MLockedForeignPtr a -> (Ptr a -> IO b) -> IO b Source #

traceMLockedForeignPtr :: (Storable a, Show a) => MLockedForeignPtr a -> IO () Source #

Deprecated: Don't leave traceMLockedForeignPtr in production

Low-level memory function

mlockedAlloca :: forall a b. CSize -> (Ptr a -> IO b) -> IO b Source #

mlockedAllocaSized :: forall n b. KnownNat n => (SizedPtr n -> IO b) -> IO b Source #

sodiumFree :: Ptr a -> IO () Source #