Skip to main content

EnvelopeCrypto

Trait EnvelopeCrypto 

Source
pub trait EnvelopeCrypto: Send + Sync {
    // Required methods
    fn encrypt_with_envelope(
        &self,
        data: &[u8],
        network_id: Option<&str>,
        profile_public_keys: Vec<Vec<u8>>,
    ) -> Result<EnvelopeEncryptedData>;
    fn decrypt_envelope_data(
        &self,
        env: &EnvelopeEncryptedData,
    ) -> Result<Vec<u8>>;
}
Expand description

High-level envelope encryption / decryption used by higher layers.

Required Methods§

Source

fn encrypt_with_envelope( &self, data: &[u8], network_id: Option<&str>, profile_public_keys: Vec<Vec<u8>>, ) -> Result<EnvelopeEncryptedData>

Source

fn decrypt_envelope_data(&self, env: &EnvelopeEncryptedData) -> Result<Vec<u8>>

Implementors§