@hackage cropty0.3.0.0

Encryption and decryption

Cropty

A little library for doing encryption using a combination of RSA and AEP, using the cryptonite library for cryptography.

import Cropty

main = do
  privateKey <- generatePrivateKey KeySize1024
  secret <- encrypt (privateToPublic privateKey) "Hello!"
  decoded <- decrypt privateKey secret
  assert (secret == decoded)