Safe Haskell | None |
---|---|
Language | Haskell2010 |
Tor defines a form of hybrid crypto, in which data is either just encrypted with a public key, or, encrypted using a hybrid of RSA and AES. This module implements this technique.
- hybridEncrypt :: MonadRandom m => Bool -> PublicKey -> ByteString -> m ByteString
- hybridDecrypt :: MonadRandom m => PrivateKey -> ByteString -> m ByteString
Documentation
hybridEncrypt :: MonadRandom m => Bool -> PublicKey -> ByteString -> m ByteString Source
Encrypt a piece of data using the given public key, optionally forcing the routine to use hybrid encryption even if the size of the data doesn't warrant it.
hybridDecrypt :: MonadRandom m => PrivateKey -> ByteString -> m ByteString Source
Decrypt a piece of data using the given private key.