Struct bearssl::br_sslrec_in_class_
[−]
[src]
#[repr(C)]pub struct br_sslrec_in_class_ { pub context_size: usize, pub check_length: Option<unsafe extern "C" fn(_: *const *const br_sslrec_in_class, _: usize) -> c_int>, pub decrypt: Option<unsafe extern "C" fn(_: *mut *const br_sslrec_in_class, _: c_int, _: c_uint, _: *mut c_void, _: *mut usize) -> *mut c_uchar>, }
Fields
context_size: usize
\brief Context size (in bytes).
check_length: Option<unsafe extern "C" fn(_: *const *const br_sslrec_in_class, _: usize) -> c_int>
\brief Test validity of the incoming record length.
This function returns 1 if the announced length for an incoming record is valid, 0 otherwise,
\param ctx decryption engine context. \param record_len incoming record length. \return 1 of a valid length, 0 otherwise.
decrypt: Option<unsafe extern "C" fn(_: *mut *const br_sslrec_in_class, _: c_int, _: c_uint, _: *mut c_void, _: *mut usize) -> *mut c_uchar>
\brief Decrypt the incoming record.
This function may assume that the record length is valid
(it has been previously tested with check_length()
).
Decryption is done in place; *len
is updated with the
cleartext length, and the address of the first plaintext
byte is returned. If the record is correct but empty, then
*len
is set to 0 and a non-NULL
pointer is returned.
On decryption/MAC error, NULL
is returned.
\param ctx decryption engine context.
\param record_type record type (23 for application data, etc).
\param version record version.
\param payload address of encrypted payload.
\param len pointer to payload length (updated).
\return pointer to plaintext, or NULL
on error.
Trait Implementations
impl Debug for br_sslrec_in_class_
[src]
impl Copy for br_sslrec_in_class_
[src]
impl Clone for br_sslrec_in_class_
[src]
fn clone(&self) -> br_sslrec_in_class_
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more