cardano-crypto-class-2.0.0.0.1: Type classes abstracting over cryptography primitives for Cardano
Safe Haskell None
Language Haskell2010

Cardano.Crypto.Libsodium

Synopsis

Initialization

MLocked memory management

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

Deprecated: Don't leave traceMLockedForeignPtr in production

MLocked bytes

data MLockedSizedBytes n Source #

Instances

Instances details
KnownNat n => Eq ( MLockedSizedBytes n) Source #
Instance details

Defined in Cardano.Crypto.Libsodium.MLockedBytes.Internal

KnownNat n => Ord ( MLockedSizedBytes n) Source #
Instance details

Defined in Cardano.Crypto.Libsodium.MLockedBytes.Internal

KnownNat n => Show ( MLockedSizedBytes n) Source #
Instance details

Defined in Cardano.Crypto.Libsodium.MLockedBytes.Internal

NFData ( MLockedSizedBytes n) Source #
Instance details

Defined in Cardano.Crypto.Libsodium.MLockedBytes.Internal

NoThunks ( MLockedSizedBytes n) Source #
Instance details

Defined in Cardano.Crypto.Libsodium.MLockedBytes.Internal

mlsbZero :: forall n. KnownNat n => MLockedSizedBytes n Source #

Note: this doesn't need to allocate mlocked memory, but we do that for consistency

mlsbToByteString :: forall n. KnownNat n => MLockedSizedBytes n -> ByteString Source #

Note: the resulting ByteString will still refer to secure memory, but the types don't prevent it from be exposed.

mlsbFinalize :: MLockedSizedBytes n -> IO () Source #

Calls finalizeMLockedForeignPtr on underlying pointer. This function invalidates argument.

Hashing