Function xkcp_sys::Kravatte_WBCAE_Decipher
source · pub unsafe extern "C" fn Kravatte_WBCAE_Decipher(
kvwInstance: *mut Kravatte_Instance,
ciphertext: *const BitSequence,
plaintext: *mut BitSequence,
dataBitLen: BitLength,
AD: *const BitSequence,
ADBitLen: BitLength
) -> c_int
Expand description
Function to decipher ciphertext into plaintext. @param kvInstance Pointer to the instance initialized by Kravatte_WBC_Initialize(). @param ciphertext Pointer to ciphertext data to decipher. Ciphertext is ::Kravatte_WBCAE_t bits longer than plaintext. @param plaintext Pointer to buffer where the deciphered data will be stored. The plaintext buffer must not overlap ciphertext. @param dataBitLen The size in bits of the plaintext data. Ciphertext and plaintext buffers must be ::Kravatte_WBCAE_t bits longer than dataBitLen. @param AD Pointer to the metadata AD. @param ADBitLen The number of bits provided in the metadata. @return 0 if successful, 1 otherwise.