doc confusion in 1.4.5 about gcry_sexp_canon_len

Marco Maggi marco.maggi-ipsu at poste.it
Fri Jan 1 11:19:49 CET 2010


The documentation of "gcry_sexp_canon_len" states:

| Scan  the  canonical  encoded @var{buffer}  with  implicit
| length   values  and   return  the   actual   length  this
| S-expression  uses.  For  a valid  S-expression  it should
| never  return 0.  If  @var{length} is  not 0,  the maximum
| length  to scan  is given;  this  can be  used for  syntax
| checks  of data  passed from  outside.   @var{errcode} and
| @var{erroff} may both be passed as @code{NULL}.

1. What does "with implicit length values" means?

2. Is it correct to  rephrase "If @var{length} is not 0, the
   maximum length to scan  is given;" to "If @var{length} is
   not 0, it must be the  maximum number of bytes to scan in
   the buffer;"?

3.  "@var{errcode} and  @var{erroff} may  both be  passed as
   @code{NULL}."   and  if they  are  not,  what values  are
   returned?

--
Marco Maggi



More information about the Gcrypt-devel mailing list