Function libindy_sys::indy_crypto_anon_crypt[][src]

pub unsafe extern "C" fn indy_crypto_anon_crypt(
    command_handle: indy_handle_t,
    recipient_vk: *const c_char,
    message_raw: *const indy_u8_t,
    message_len: indy_u32_t,
    cb: indy_slice_cb
) -> indy_error_t

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

#Params command_handle: command handle to map callback to user context. recipient_vk: verkey of message recipient message_raw: a pointer to first byte of message that to be encrypted message_len: a message length cb: Callback that takes command result as parameter.

#Returns an encrypted message as a pointer to array of vytes

#Errors Common* Wallet* Ledger* Crypto*