Safe Haskell | None |
---|---|
Language | Haskell2010 |
Temporal.Codec.Encryption
Synopsis
- data Key
- keyFromBytes :: ScrubbedBytes -> Key
- data Cipher
- keyToBase64 :: Key -> ByteString
- keyFromBase64 :: ByteString -> Either String Key
- genSecretKey :: MonadRandom m => m Key
- initCipher :: Key -> Either String Cipher
- data Encrypted
- mkEncryptionCodec :: MonadIO m => (ByteString, Cipher) -> Map ByteString Cipher -> m (Either String Encrypted)
Documentation
keyFromBytes :: ScrubbedBytes -> Key Source #
keyToBase64 :: Key -> ByteString Source #
keyFromBase64 :: ByteString -> Either String Key Source #
genSecretKey :: MonadRandom m => m Key Source #
Generates a string of bytes (key) of a specific length for a given block cipher
Instances
mkEncryptionCodec :: MonadIO m => (ByteString, Cipher) -> Map ByteString Cipher -> m (Either String Encrypted) Source #