Function libindy_sys::indy_crypto_anon_decrypt[][src]

pub unsafe extern "C" fn indy_crypto_anon_decrypt(
    command_handle: indy_handle_t,
    wallet_handle: indy_handle_t,
    recipient_vk: *const c_char,
    encrypted_msg: *const indy_u8_t,
    encrypted_len: indy_u32_t,
    cb: indy_slice_cb
) -> indy_error_t

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 indy_key_for_did to get key id (verkey) for specific DID.

#Params command_handle: command handle to map callback to user context. wallet_handle: wallet handler (created by open_wallet). recipient_vk: id (verkey) of my key. The key must be created by calling indy_create_key or indy_create_and_store_my_did encrypted_msg_raw: a pointer to first byte of message that to be decrypted encrypted_msg_len: a message length cb: Callback that takes command result as parameter.

#Returns decrypted message as a pointer to an array of bytes

#Errors Common* Wallet* Crypto*