1 @subheading asn1_length_der
2 @anchor{asn1_length_der}
3 @deftypefun {void} {asn1_length_der} (unsigned long int @var{len}, unsigned char * @var{ans}, int * @var{ans_len})
4 @var{len}: value to convert.
6 @var{ans}: string returned.
8 @var{ans_len}: number of meaningful bytes of ANS (ans[0]..ans[ans_len-1]).
10 Creates the DER coding for the LEN parameter (only the length).
11 The @code{ans} buffer is pre-allocated and must have room for the output.
14 @subheading asn1_octet_der
15 @anchor{asn1_octet_der}
16 @deftypefun {void} {asn1_octet_der} (const unsigned char * @var{str}, int @var{str_len}, unsigned char * @var{der}, int * @var{der_len})
17 @var{str}: OCTET string.
19 @var{str_len}: STR length (str[0]..str[str_len-1]).
21 @var{der}: string returned.
23 @var{der_len}: number of meaningful bytes of DER (der[0]..der[ans_len-1]).
25 Creates the DER coding for an OCTET type (length included).
28 @subheading asn1_bit_der
30 @deftypefun {void} {asn1_bit_der} (const unsigned char * @var{str}, int @var{bit_len}, unsigned char * @var{der}, int * @var{der_len})
31 @var{str}: BIT string.
33 @var{bit_len}: number of meaningful bits in STR.
35 @var{der}: string returned.
37 @var{der_len}: number of meaningful bytes of DER
38 (der[0]..der[ans_len-1]).
40 Creates the DER coding for a BIT STRING type (length and pad
44 @subheading asn1_der_coding
45 @anchor{asn1_der_coding}
46 @deftypefun {asn1_retCode} {asn1_der_coding} (ASN1_TYPE @var{element}, const char * @var{name}, void * @var{ider}, int * @var{len}, char * @var{ErrorDescription})
47 @var{element}: pointer to an ASN1 element
49 @var{name}: the name of the structure you want to encode (it must be
52 @var{ider}: vector that will contain the DER encoding. DER must be a
53 pointer to memory cells already allocated.
55 @var{len}: number of bytes of *@code{ider}: @code{ider}[0]..@code{ider}[len-1], Initialy
56 holds the sizeof of der vector.
58 Creates the DER encoding for the NAME structure (inside *POINTER
61 @strong{Returns:} @end deftypefun