How to use an crypto with hackage cereal?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
22 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: How to use an crypto with hackage cereal?

Tom Ellis
On Tue, Apr 21, 2015 at 09:58:42PM +0800, Magicloud Magiclouds wrote:
> Thank you. But how if the cipher was specified outside the binary data? I
> mean I need to pass the decrypt/encrypt function to get/put while they do
> not accept parameters. Should I use Reader here?

I think the crux of the problem is that you are trying to use the Serialize
typeclass.  Don't.  Just write functions.

Tom

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: How to use an crypto with hackage cereal?

Magicloud Magiclouds
Yes, I ended up writing my own FieldCryptoSerialize class.

On Thu, Apr 23, 2015 at 4:58 PM, Tom Ellis <[hidden email]> wrote:
On Tue, Apr 21, 2015 at 09:58:42PM +0800, Magicloud Magiclouds wrote:
> Thank you. But how if the cipher was specified outside the binary data? I
> mean I need to pass the decrypt/encrypt function to get/put while they do
> not accept parameters. Should I use Reader here?

I think the crux of the problem is that you are trying to use the Serialize
typeclass.  Don't.  Just write functions.

Tom

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe



--
竹密岂妨流水过
山高哪阻野云飞

And for G+, please use magiclouds#gmail.com.

_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
12