Initialize Tizen 2.3
[external/libtasn1.git] / doc / texi / coding.c.texi
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.
5
6 @var{ans}: string returned.
7
8 @var{ans_len}: number of meaningful bytes of ANS (ans[0]..ans[ans_len-1]).
9
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.
12 @end deftypefun
13
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.
18
19 @var{str_len}: STR length (str[0]..str[str_len-1]).
20
21 @var{der}: string returned.
22
23 @var{der_len}: number of meaningful bytes of DER (der[0]..der[ans_len-1]).
24
25 Creates the DER coding for an OCTET type (length included).
26 @end deftypefun
27
28 @subheading asn1_bit_der
29 @anchor{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.
32
33 @var{bit_len}: number of meaningful bits in STR.
34
35 @var{der}: string returned.
36
37 @var{der_len}: number of meaningful bytes of DER
38 (der[0]..der[ans_len-1]).
39
40 Creates the DER coding for a BIT STRING type (length and pad
41 included).
42 @end deftypefun
43
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
48
49 @var{name}: the name of the structure you want to encode (it must be
50 inside *POINTER).
51
52 @var{ider}: vector that will contain the DER encoding. DER must be a
53 pointer to memory cells already allocated.
54
55 @var{len}: number of bytes of *@code{ider}: @code{ider}[0]..@code{ider}[len-1], Initialy
56 holds the sizeof of der vector.
57
58 Creates the DER encoding for the NAME structure (inside *POINTER
59 structure).
60
61 @strong{Returns:} @end deftypefun
62