tel / saltine

Cryptography that's easy to digest (NaCl/libsodium bindings)
https://github.com/tel/saltine
MIT License
61 stars 29 forks source link

Better access for SecretKey/PublicKey/CombinedKey/Key/Nonce #2

Closed tel closed 3 years ago

tel commented 11 years ago

Right now these are totally opaque boxes, which is a problem. Ideally it'd be nice to have a lens-like IsByteString class to project into them. Unfortunately, that can't quite work because IsByteString needs Iso's. There's already a Crypto.Saltine.Class module containing IsEncoding which provides Prism' access to these guys.

This'll also lead to nice Show instances for these guys.

tel commented 11 years ago

A lot of this is already done in the message branch.

linearray commented 3 years ago

Did not touch or add anything lens-related, as I don't use it, but Internal modules do now expose all useful data types and provide Show instances.