Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Crypto.Paseto.ScrubbedBytes
Synopsis
- data ScrubbedBytes32 where
- pattern ScrubbedBytes32 :: ScrubbedBytes -> ScrubbedBytes32
- mkScrubbedBytes32 :: ByteArrayAccess b => b -> Maybe ScrubbedBytes32
- fromSizedBytes :: SizedByteArray 32 ScrubbedBytes -> ScrubbedBytes32
- toBytes :: ScrubbedBytes32 -> ScrubbedBytes
- toSizedBytes :: ScrubbedBytes32 -> SizedByteArray 32 ScrubbedBytes
- generateScrubbedBytes32 :: IO ScrubbedBytes32
Documentation
data ScrubbedBytes32 where Source #
Simple wrapper around a 32-byte (256-bit) ScrubbedBytes
value.
Note that this type's Eq
instance performs a constant-time equality check.
Bundled Patterns
pattern ScrubbedBytes32 :: ScrubbedBytes -> ScrubbedBytes32 |
Instances
mkScrubbedBytes32 :: ByteArrayAccess b => b -> Maybe ScrubbedBytes32 Source #
Construct a 32-byte (256-bit) ScrubbedBytes
value from an array of
bytes.
fromSizedBytes :: SizedByteArray 32 ScrubbedBytes -> ScrubbedBytes32 Source #
Construct a ScrubbedBytes32
value from a SizedByteArray
of
ScrubbedBytes
.
toBytes :: ScrubbedBytes32 -> ScrubbedBytes Source #
Convert a ScrubbedBytes32
value to ScrubbedBytes
.
toSizedBytes :: ScrubbedBytes32 -> SizedByteArray 32 ScrubbedBytes Source #
Convert a ScrubbedBytes32
value to a SizedByteArray
of
ScrubbedBytes
.
generateScrubbedBytes32 :: IO ScrubbedBytes32 Source #
Randomly generate a ScrubbedBytes32
value.