diff --git a/Crypto/Internal/Memory.hs b/Crypto/Internal/Memory.hs index b549603..5ef5d85 100644 --- a/Crypto/Internal/Memory.hs +++ b/Crypto/Internal/Memory.hs @@ -18,6 +18,7 @@ module Crypto.Internal.Memory , bytesAlloc , bytesLength , withBytes + , SecureBytes ) where import Data.Word @@ -29,9 +30,12 @@ import Foreign.ForeignPtr import Foreign.Storable (pokeElemOff) import Foreign.Marshal.Alloc import Foreign.Marshal.Utils (copyBytes) +import Data.SecureMem (SecureMem) data Bytes = Bytes (MutableByteArray# RealWorld) +type SecureBytes = SecureMem + ------------------------------------------------------------------------ newBytes :: Int -> IO Bytes newBytes (I# sz) = IO $ \s ->