src/lib/crypto.c
int crypto_sign_encode(SIGNATURE *sig, uint8_t *dest, uint32_t *length)
{
   if (*length == 0) {
      *length = i2d_SignatureData(sig->sigData, NULL);
      return true;
   }

   *length = i2d_SignatureData(sig->sigData, (unsigned char **)&dest);
   return true;
}
/*
 * Encodes the SignatureData structure. The length argument is used to specify the
 * size of dest. A length of 0 will cause no data to be written to dest, and the
 * required length to be written to length. The caller can then allocate sufficient
 * space for the output.
 *
 * Returns: true on success, stores the encoded data in dest, and the size in length.
 *          false on failure.
 */
Encodes the SignatureData structure. The length argument is used to specify the
size of dest. A length of 0 will cause no data to be written to dest, and the
required length to be written to length. The caller can then allocate sufficient
space for the output.

true on success, stores the encoded data in dest, and the size in length.
false on failure.
Encodes the SignatureData structure . The length argument is used to specify the size of dest . A length of 0 will cause no data to be written to dest and the required length to be written to length . The caller can then allocate sufficient space for the output . true on success stores the encoded data in dest and the size in length . false on failure .
int crypto_sign_encode(SIGNATURE *sig, uint8_t *dest, uint32_t *length)
{
   if (*length == 0) {
      *length = i2d_SignatureData(sig->sigData, NULL);
      return true;
   }
   *length = i2d_SignatureData(sig->sigData, (unsigned char **)&dest);
   return true;
}
int crypto_sign_encode ( SIGNATURE * sig , uint8_t * dest , uint32_t * length ) { if ( * length == 0 ) { * length = i2d_SignatureData ( sig -> sigData , NULL ) ; return true ; } * length = i2d_SignatureData ( sig -> sigData , ( unsigned char * * ) & dest ) ; return true ; }
Encodes the SignatureData structure.
Encodes the SignatureData structure .