Closed Qqwy closed 6 years ago
Hi. FromJSON
and ToJSON
are typeclasses from the aeson
library. If you import Data.Aeson
you should be able to use its encode
and decode
functions to convert to and from ByteString
s.
Thank you! This works exactly as intended. :heart:
Hello there!
I am attempting to use this library to send symmetrically-encrypted information. I am able to run the JWE example fine, but this generates a new key every time.
I am having trouble figuring out how to use the library with a pregenerated key rather than a newly generated one. And, related, how to export a key that was generated using
generateSymmetricKey
.I am guessing that this might have to do with the
FromJSON
andToJSON
typeclasses, but I am not entirely sure how to get their functions in scope. Also, I would just be happy to export the strings in some other easy-to-transport format (hexencoded, base64-encoded or similar) instead.Thanks!