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.MLockedBytes

Synopsis

Documentation

data MLockedSizedBytes n Source #

Instances

Instances details
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

Methods

rnf :: MLockedSizedBytes n -> () Source #

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

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.