| Copyright | (c) Justin Le 2017 |
|---|---|
| License | MIT |
| Maintainer | justin@jle.im |
| Stability | unstable |
| Portability | portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Encrypted
Description
Basically provides , which abstracts over an encrypted Enc aa.
Can only be read by invoking GnuPG in IO, where the user needs to
provide their key to decrypt.
One main advantage is that an can be seriealized and
deserialized using its Enc aBinary instance, providing type-safe
deserialization into encrypted values.
Might be pulled out to an external package some day.
Documentation
An abstracts over a encrypted Enc aa.
Has a useful Binary instance, which allows type-safe deserialization
into encrypted values.
mkEnc :: Binary a => Ctx -> Key -> a -> IO (Enc a) Source #
Wrap a value into an Enc, using a given GnuPG key.
overEnc :: Binary a => Ctx -> Key -> Enc a -> (a -> IO a) -> IO (Enc a) Source #
Modify an encrypted value with a given a -> IO a function,
re-encrypting it with the given GnuPG key. The decrypted value never
leaves the closure.