tokenising a sexp, possible without serialisation?

Marco Maggi marco.maggi-ipsu at poste.it
Sun Jan 3 09:11:28 CET 2010


Ciao,

  I am writing a binding for a high-level language; it would
really  improve  my   API  user-friendliness  to  convert  a
Gcrypt's sexp into a sexp for the language.

  I   would  like   to  do   it  without   converting  first
"gcry_sexp_t"  to  a  string  in  canon format,  but  is  it
actually  possible using the  "gcry_sexp_nth_*()" functions?
What I miss is a way to determine if the next item is a tag,
an MPI or an "unsigned long" (using the public Gcrypt API).

  The attached  dirty program does  not work when  there are
MPI numbers in the sexp.

TIA

-------------- next part --------------
A non-text attachment was scrubbed...
Name: sexp-tokens.c
Type: application/octet-stream
Size: 2007 bytes
Desc: not available
URL: </pipermail/attachments/20100103/8b9a77bf/attachment.obj>
-------------- next part --------------
-- 
Marco Maggi


More information about the Gcrypt-devel mailing list