Function gnunet_sys::GNUNET_IDENTITY_write_signature_to_buffer[][src]

pub unsafe extern "C" fn GNUNET_IDENTITY_write_signature_to_buffer(
    sig: *const GNUNET_IDENTITY_Signature,
    buffer: *mut c_void,
    len: usize
) -> isize

Writes a #GNUNET_IDENTITY_Signature to a compact buffer. The buffer requires space for 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 key is not valid, 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 written to the buffer