Function wallet_core::c::symmetric_cipher_decrypt
source · pub unsafe fn symmetric_cipher_decrypt(
password: *const u8,
password_length: usize,
ciphertext: *const u8,
ciphertext_length: usize,
plaintext_out: *mut *const u8,
plaintext_out_length: *mut usize
) -> Result
Expand description
decrypt payload of the wallet transfer protocol
Parameters
password: byte buffer with the encryption password password_length: length of the password buffer ciphertext: byte buffer with the encryption password ciphertext_length: length of the password buffer plaintext_out: used to return a pointer to a byte buffer with the decrypted text plaintext_out_length: used to return the length of decrypted text
The returned buffer is in the heap, so make sure to call the delete_buffer function
Safety
This function dereference raw pointers. Even though the function checks if the pointers are null. Mind not to put random values in or you may see unexpected behaviors.