pub trait SecretStore: Sized + Send + Sync + 'static {
    fn generate_document_key(
        &self,
        _: H160,
        _: Password,
        _: H512
    ) -> Result<EncryptedDocumentKey>;
fn encrypt(&self, _: H160, _: Password, _: Bytes, _: Bytes) -> Result<Bytes>;
fn decrypt(&self, _: H160, _: Password, _: Bytes, _: Bytes) -> Result<Bytes>;
fn shadow_decrypt(
        &self,
        _: H160,
        _: Password,
        _: H512,
        _: H512,
        _: Vec<Bytes>,
        _: Bytes
    ) -> Result<Bytes>;
fn servers_set_hash(&self, _: BTreeSet<H512>) -> Result<H256>;
fn sign_raw_hash(&self, _: H160, _: Password, _: H256) -> Result<Bytes>; fn to_delegate<M: Metadata>(self) -> IoDelegate<Self, M> { ... } }
Expand description

Parity-specific rpc interface.

Required methods

Generate document key to store in secret store. Arguments: account, password, server_key_public.

Encrypt data with key, received from secret store. Arguments: account, password, key, data.

Decrypt data with key, received from secret store. Arguments: account, password, key, data.

Decrypt data with shadow key, received from secret store. Arguments: account, password, decrypted_secret, common_point, decrypt_shadows, data.

Calculates the hash (keccak256) of servers set for using in ServersSetChange session. Returned hash must be signed later by using secretstore_signRawHash method. Arguments: servers_set.

Generate recoverable ECDSA signature of raw hash. Passed hash is treated as an input to the sign function (no prefixes added, no hash function is applied). Arguments: account, password, raw_hash.

Provided methods

Create an IoDelegate, wiring rpc calls to the trait methods.

Implementors