[][src]Function indyrs::crypto::anon_decrypt

pub fn anon_decrypt(
    wallet_handle: IndyHandle,
    recipient_vk: &str,
    encrypted_message: &[u8]
) -> Box<dyn Future<Item = Vec<u8>, Error = IndyError>>

Decrypts a message by anonymous-encryption scheme.

Sealed boxes are designed to anonymously send messages to a Recipient given its public key. Only the Recipient can decrypt these messages, using its private key. While the Recipient can verify the integrity of the message, it cannot verify the identity of the Sender.

Note to use DID keys with this function you can call Did::get_ver_key to get key id (verkey) for specific DID.

Note: use unpack_message function for A2A goals.

Arguments

  • wallet_handle: wallet handle (created by Wallet::open).
  • recipient_vk: key id or verkey of my key. The key must be created by calling create_key or Did::new
  • encrypted_message: a pointer to first byte of message that to be decrypted

Returns

decrypted message