Initialize Tizen 2.3
[external/libtasn1.git] / doc / texi / asn1_der_decoding.texi
1 @subheading asn1_der_decoding
2 @anchor{asn1_der_decoding}
3 @deftypefun {asn1_retCode} {asn1_der_decoding} (ASN1_TYPE * @var{element}, const void * @var{ider}, int @var{len}, char * @var{errorDescription})
4 @var{element}: pointer to an ASN1 structure.
5
6 @var{ider}: vector that contains the DER encoding.
7
8 @var{len}: number of bytes of *@code{ider}: @code{ider}[0]..@code{ider}[len-1].
9
10 @var{errorDescription}: null-terminated string contains details when an
11 error occurred.
12
13 Fill the structure *@code{ELEMENT} with values of a DER encoding
14 string. The structure must just be created with function
15 @code{asn1_create_element()}.  If an error occurs during the decoding
16 procedure, the *@code{ELEMENT} is deleted and set equal to
17 @code{ASN1_TYPE_EMPTY}.
18
19 @strong{Returns:} @code{ASN1_SUCCESS} if DER encoding OK, @code{ASN1_ELEMENT_NOT_FOUND}
20 if @code{ELEMENT} is @code{ASN1_TYPE_EMPTY}, and @code{ASN1_TAG_ERROR} or
21 @code{ASN1_DER_ERROR} if the der encoding doesn't match the structure
22 name (*@code{ELEMENT} deleted).
23 @end deftypefun
24