Safe Haskell | None |
---|---|
Language | Haskell2010 |
Cryptographic effect for securing tokens
Synopsis
- data Crypto m a where
- encryptSecret :: Members [SecretInput Text, Crypto] r => TokenSpec -> Sem r TokenSpec
- decryptSecret :: Members [SecretInput Text, Crypto] r => TokenSpec -> Sem r Text
- runCrypto :: Members [CryptoRandom, Error EffError] r => Sem (Crypto ': r) a -> Sem r a
Effect
data Crypto m a where Source #
Effect for encrypting and decrypting secrets
Encrypt | Encrypts a secret with an optional password |
| |
Decrypt | Decrypt a secret with an optional password |
Instances
type DefiningModule (Crypto :: k -> Type -> Type) Source # | |
Defined in Gamgee.Effects.Crypto |
Programs
encryptSecret :: Members [SecretInput Text, Crypto] r => TokenSpec -> Sem r TokenSpec Source #
decryptSecret :: Members [SecretInput Text, Crypto] r => TokenSpec -> Sem r Text Source #