1asn1_bit_der(3) libtasn1 asn1_bit_der(3)
2
3
4
6 asn1_bit_der - API function
7
9 #include <libtasn1.h>
10
11 void asn1_bit_der(const unsigned char * str, int bit_len, unsigned char
12 * der, int * der_len);
13
15 const unsigned char * str
16 BIT string.
17
18 int bit_len number of meaningful bits in STR.
19
20 unsigned char * der
21 string returned.
22
23 int * der_len
24 number of meaningful bytes of DER (der[0]..der[ans_len-1]).
25
27 Creates a length-value DER encoding for the input data as it would have
28 been for a BIT STRING. The DER encoded data will be copied in der .
29
30 Note that the BIT 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_bit_der(3)