pub trait Crypto: Sized {
    type SecretBox;
    type Error;
    fn seal<K: AsRef<[u8]>>(
        &self,
        secret: K
    ) -> Result<Self::SecretBox, Self::Error>;
fn unseal(&self, secret_box: Self::SecretBox) -> Result<SecStr, Self::Error>; }
Expand description

Class of types which can seal (encrypt) a secret, and unseal (decrypt) it from it’s sealed form.

It is up to the user to perform conversion from and to domain types.

Associated Types

Required methods

Implementors