Function gnunet_sys::GNUNET_IDENTITY_read_signature_from_buffer [−][src]
pub unsafe extern "C" fn GNUNET_IDENTITY_read_signature_from_buffer(
sig: *mut GNUNET_IDENTITY_Signature,
buffer: *const c_void,
len: usize
) -> isize
Reads a #GNUNET_IDENTITY_Signature from a compact buffer. The buffer has to contain at least the compacted length of a #GNUNET_IDENTITY_Signature in bytes. If the buffer is too small, the function returns -1 as error. If the buffer does not contain a valid key, it returns -2 as error.
@param sig the signature @param buffer the buffer @param len the length of buffer @return -1 or -2 on error, else the amount of bytes read from the buffer