Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

serde support #36

Open
jymchng opened this issue Feb 2, 2024 · 0 comments
Open

serde support #36

jymchng opened this issue Feb 2, 2024 · 0 comments
Assignees

Comments

@jymchng
Copy link
Owner

jymchng commented Feb 2, 2024

(in pseudocode)

#![cfg(feature = "serializable-secret")]

...

Secret<T: SerializableSecret, MEC, EC>.serialize_secret<EC: EncryptionKeyTrait>(ec: EC) -> SerializableSecret<T: SerializableSecret, MEC, EC>

Then impl serde::Serialize for SerializableSecret<_, _, _>.

The advantages are:

  1. Feature-gated.
  2. Even if feature is enabled, user of the library can choose to only impl SerializableSecret for some-of-their-T (library will impl for common Ts in std).
@jymchng jymchng self-assigned this Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant