Safe Haskell | None |
---|---|
Language | Haskell2010 |
Symmetric authenticated encryption for streams.
This module provides generic types for Sodium-based streaming encryption. It does not provide any functionality itself.
There are separate packages that actually implement this functionality for specific streaming libraries:
crypto-sodium-streamly
forstreamly
streams.
Synopsis
- type Key a = SizedByteArray CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_KEYBYTES a
- toKey :: ByteArrayAccess ba => ba -> Maybe (Key ba)
Keys
type Key a = SizedByteArray CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_KEYBYTES a Source #
Encryption key that can be used for streaming symmetric encryption.
This type is parametrised by the actual data type that contains
bytes. This can be, for example, a ByteString
, but, since this
is a secret key, it is better to use ScrubbedBytes
.