Trait private_tx::Encryptor[][src]

pub trait Encryptor: Send + Sync + 'static {
    fn encrypt(
        &self,
        contract_address: &Address,
        initialisation_vector: &H128,
        plain_data: &[u8]
    ) -> Result<Bytes, Error>;
fn decrypt(
        &self,
        contract_address: &Address,
        cypher: &[u8]
    ) -> Result<Bytes, Error>; }

Trait for encryption/decryption operations.

Required methods

fn encrypt(
    &self,
    contract_address: &Address,
    initialisation_vector: &H128,
    plain_data: &[u8]
) -> Result<Bytes, Error>
[src]

Generate unique contract key && encrypt passed data. Encryption can only be performed once.

fn decrypt(
    &self,
    contract_address: &Address,
    cypher: &[u8]
) -> Result<Bytes, Error>
[src]

Decrypt data using previously generated contract key.

Loading content...

Implementors

impl Encryptor for NoopEncryptor[src]

impl Encryptor for SecretStoreEncryptor[src]

fn decrypt(
    &self,
    contract_address: &Address,
    cypher: &[u8]
) -> Result<Bytes, Error>
[src]

Decrypt data using previously generated contract key.

Loading content...