-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | abstraction to an auto scrubbing and const time eq, memory chunk. -- @package securemem @version 0.1.8 module Data.SecureMem -- | SecureMem is a memory chunk which have the properties of: -- -- data SecureMem secureMemGetSize :: SecureMem -> Int secureMemCopy :: SecureMem -> IO SecureMem -- | Types that can be converted to a secure mem object. class ToSecureMem a toSecureMem :: ToSecureMem a => a -> SecureMem -- | Allocate a new SecureMem -- -- The memory is allocated on the haskell heap, and will be scrubed -- before being released. allocateSecureMem :: Int -> IO SecureMem -- | Create a new secure mem and running an initializer function createSecureMem :: Int -> (Ptr Word8 -> IO ()) -> IO SecureMem -- | Create a new secure mem using inline perform IO to create a pure -- result. unsafeCreateSecureMem :: Int -> (Ptr Word8 -> IO ()) -> SecureMem -- | Finalize a SecureMem early finalizeSecureMem :: SecureMem -> IO () -- | This is a way to look at the pointer living inside a foreign object. -- This function takes a function which is applied to that pointer. The -- resulting IO action is then executed -- -- this is similary to withForeignPtr for a ForeignPtr withSecureMemPtr :: SecureMem -> (Ptr Word8 -> IO b) -> IO b -- | similar to withSecureMem but also include the size of the pointed -- memory. withSecureMemPtrSz :: SecureMem -> (Int -> Ptr Word8 -> IO b) -> IO b withSecureMemCopy :: SecureMem -> (Ptr Word8 -> IO ()) -> IO SecureMem -- | Create a SecureMem from a bytestring secureMemFromByteString :: ByteString -> SecureMem -- | Create a SecureMem from any byteable object secureMemFromByteable :: Byteable b => b -> SecureMem instance ToSecureMem ByteString instance ToSecureMem SecureMem instance Monoid SecureMem instance Eq SecureMem instance Byteable SecureMem instance Show SecureMem