Warn about instances exposing internals
This commit is contained in:
parent
81cc351800
commit
d49408156e
@ -30,6 +30,11 @@ import Crypto.Internal.Compat
|
||||
import Crypto.Internal.Imports
|
||||
|
||||
-- | The encryption state for RC4
|
||||
--
|
||||
-- This type is an instance of 'ByteArrayAccess' for debugging purpose. Internal
|
||||
-- layout is architecture dependent, may contain uninitialized data fragments,
|
||||
-- and change in future versions. The bytearray should not be used as input to
|
||||
-- cryptographic algorithms.
|
||||
newtype State = State ScrubbedBytes
|
||||
deriving (ByteArrayAccess,NFData)
|
||||
|
||||
|
||||
@ -24,6 +24,11 @@ import qualified Crypto.Internal.ByteArray as B
|
||||
import Foreign.Ptr
|
||||
|
||||
-- | A Mutable hash context
|
||||
--
|
||||
-- This type is an instance of 'B.ByteArrayAccess' for debugging purpose.
|
||||
-- Internal layout is architecture dependent, may contain uninitialized data
|
||||
-- fragments, and change in future versions. The bytearray should not be used
|
||||
-- as input to cryptographic algorithms.
|
||||
newtype MutableContext a = MutableContext B.Bytes
|
||||
deriving (B.ByteArrayAccess)
|
||||
|
||||
|
||||
@ -77,6 +77,11 @@ hashContextGetAlgorithm = undefined
|
||||
-}
|
||||
|
||||
-- | Represent a context for a given hash algorithm.
|
||||
--
|
||||
-- This type is an instance of 'ByteArrayAccess' for debugging purpose. Internal
|
||||
-- layout is architecture dependent, may contain uninitialized data fragments,
|
||||
-- and change in future versions. The bytearray should not be used as input to
|
||||
-- cryptographic algorithms.
|
||||
newtype Context a = Context Bytes
|
||||
deriving (ByteArrayAccess,NFData)
|
||||
|
||||
|
||||
@ -33,6 +33,11 @@ import Crypto.Internal.DeepSeq
|
||||
import Crypto.Error
|
||||
|
||||
-- | Poly1305 State
|
||||
--
|
||||
-- This type is an instance of 'ByteArrayAccess' for debugging purpose. Internal
|
||||
-- layout is architecture dependent, may contain uninitialized data fragments,
|
||||
-- and change in future versions. The bytearray should not be used as input to
|
||||
-- cryptographic algorithms.
|
||||
newtype State = State ScrubbedBytes
|
||||
deriving (ByteArrayAccess)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user