1asn1_octet_der(3) libtasn1 asn1_octet_der(3)
2
3
4
6 asn1_octet_der - API function
7
9 #include <libtasn1.h>
10
11 void asn1_octet_der(const unsigned char * str, int str_len, unsigned
12 char * der, int * der_len);
13
15 const unsigned char * str
16 the input data.
17
18 int str_len STR length (str[0]..str[*str_len-1]).
19
20 unsigned char * der
21 encoded string returned.
22
23 int * der_len
24 number of meaningful bytes of DER (der[0]..der[der_len-1]).
25
27 Creates a length-value DER encoding for the input data. The DER encod‐
28 ing of the input data will be placed in the der variable.
29
30 Note that the OCTET STRING tag is not included in the output.
31
32 This function does not return any value because it is expected that
33 der_len will contain enough bytes to store the string plus the DER en‐
34 coding. The DER encoding size can be obtained using asn1_length_der().
35
37 Copyright © 2006-2022 Free Software Foundation, Inc..
38 Copying and distribution of this file, with or without modification,
39 are permitted in any medium without royalty provided the copyright no‐
40 tice and this notice are preserved.
41
43 The full documentation for libtasn1 is maintained as a Texinfo manual.
44 If the info and libtasn1 programs are properly installed at your site,
45 the command
46
47 info libtasn1
48
49 should give you access to the complete manual. As an alternative you
50 may obtain the manual from:
51
52 https://www.gnu.org/software/libtasn1/manual/
53
54libtasn1 4.19.0 asn1_octet_der(3)