[−][src]Function indyrs::crypto::anon_crypt
pub fn anon_crypt(
recipient_vk: &str,
message: &[u8]
) -> Box<dyn Future<Item = Vec<u8>, Error = IndyError>>
Encrypts 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 pack_message function for A2A goals.
Arguments
wallet_handle
: wallet handle (created by Wallet::open)recipient_vk
: verkey of message recipientmessage
: a pointer to first byte of message that to be encrypted
Returns
the encrypted message