Function xkcp_sys::Kravatte_SANSE_Wrap
source · pub unsafe extern "C" fn Kravatte_SANSE_Wrap(
kvInstance: *mut Kravatte_SANSE_Instance,
plaintext: *const BitSequence,
ciphertext: *mut BitSequence,
dataBitLen: BitLength,
AD: *const BitSequence,
ADBitLen: BitLength,
tag: *mut c_uchar
) -> c_int
Expand description
Function to wrap plaintext into ciphertext. @param kvInstance Pointer to the instance initialized by Kravatte_SANSE_Initialize(). @param plaintext Pointer to plaintext data to wrap. @param ciphertext Pointer to buffer where the full wrapped data will be stored. The ciphertext buffer must not overlap plaintext. @param dataBitLen The size of the plaintext/ciphertext data. @param AD Pointer to the Associated Data. @param ADBitLen The number of bytes provided in the Associated Data. @param tag The buffer where to store the tag. This buffer must be minimum Kravatte_SANSE_TagLength bytes long. @return 0 if successful, 1 otherwise.