Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype MLockedSeed n = MLockedSeed {}
- withMLockedSeedAsMLSB ∷ Functor m ⇒ (MLockedSizedBytes n → m (MLockedSizedBytes n)) → MLockedSeed n → m (MLockedSeed n)
- mlockedSeedCopy ∷ (KnownNat n, MonadST m) ⇒ MLockedSeed n → m (MLockedSeed n)
- mlockedSeedCopyWith ∷ (KnownNat n, MonadST m) ⇒ MLockedAllocator m → MLockedSeed n → m (MLockedSeed n)
- mlockedSeedNew ∷ (KnownNat n, MonadST m) ⇒ m (MLockedSeed n)
- mlockedSeedNewWith ∷ (KnownNat n, MonadST m) ⇒ MLockedAllocator m → m (MLockedSeed n)
- mlockedSeedNewZero ∷ (KnownNat n, MonadST m) ⇒ m (MLockedSeed n)
- mlockedSeedNewZeroWith ∷ (KnownNat n, MonadST m) ⇒ MLockedAllocator m → m (MLockedSeed n)
- mlockedSeedNewRandom ∷ ∀ n. KnownNat n ⇒ IO (MLockedSeed n)
- mlockedSeedNewRandomWith ∷ ∀ n. KnownNat n ⇒ MLockedAllocator IO → IO (MLockedSeed n)
- mlockedSeedFinalize ∷ MonadST m ⇒ MLockedSeed n → m ()
- mlockedSeedUseAsCPtr ∷ MonadST m ⇒ MLockedSeed n → (Ptr Word8 → m b) → m b
- mlockedSeedUseAsSizedPtr ∷ MonadST m ⇒ MLockedSeed n → (SizedPtr n → m b) → m b
Documentation
newtype MLockedSeed n Source #
A seed of size n
, stored in mlocked memory. This is required to prevent
the seed from leaking to disk via swapping and reclaiming or scanning memory
after its content has been moved.
Instances
KnownNat n ⇒ DirectDeserialise (MLockedSeed n) Source # | |
Defined in Cardano.Crypto.Libsodium.MLockedSeed directDeserialise ∷ (MonadST m, MonadThrow m) ⇒ (Ptr CChar → CSize → m ()) → m (MLockedSeed n) Source # | |
KnownNat n ⇒ DirectSerialise (MLockedSeed n) Source # | |
Defined in Cardano.Crypto.Libsodium.MLockedSeed directSerialise ∷ (MonadST m, MonadThrow m) ⇒ (Ptr CChar → CSize → m ()) → MLockedSeed n → m () Source # | |
NFData (MLockedSeed n) Source # | |
Defined in Cardano.Crypto.Libsodium.MLockedSeed rnf ∷ MLockedSeed n → () Source # | |
NoThunks (MLockedSeed n) Source # | |
Defined in Cardano.Crypto.Libsodium.MLockedSeed |
withMLockedSeedAsMLSB ∷ Functor m ⇒ (MLockedSizedBytes n → m (MLockedSizedBytes n)) → MLockedSeed n → m (MLockedSeed n) Source #
mlockedSeedCopy ∷ (KnownNat n, MonadST m) ⇒ MLockedSeed n → m (MLockedSeed n) Source #
mlockedSeedCopyWith ∷ (KnownNat n, MonadST m) ⇒ MLockedAllocator m → MLockedSeed n → m (MLockedSeed n) Source #
mlockedSeedNew ∷ (KnownNat n, MonadST m) ⇒ m (MLockedSeed n) Source #
mlockedSeedNewWith ∷ (KnownNat n, MonadST m) ⇒ MLockedAllocator m → m (MLockedSeed n) Source #
mlockedSeedNewZero ∷ (KnownNat n, MonadST m) ⇒ m (MLockedSeed n) Source #
mlockedSeedNewZeroWith ∷ (KnownNat n, MonadST m) ⇒ MLockedAllocator m → m (MLockedSeed n) Source #
mlockedSeedNewRandom ∷ ∀ n. KnownNat n ⇒ IO (MLockedSeed n) Source #
mlockedSeedNewRandomWith ∷ ∀ n. KnownNat n ⇒ MLockedAllocator IO → IO (MLockedSeed n) Source #
mlockedSeedFinalize ∷ MonadST m ⇒ MLockedSeed n → m () Source #
mlockedSeedUseAsCPtr ∷ MonadST m ⇒ MLockedSeed n → (Ptr Word8 → m b) → m b Source #
mlockedSeedUseAsSizedPtr ∷ MonadST m ⇒ MLockedSeed n → (SizedPtr n → m b) → m b Source #