1fmt_asn1derlength(3) Library Functions Manual fmt_asn1derlength(3)
2
3
4
6 fmt_asn1derlength - encode unsigned integer like ASN.1 DER length
7
9 #include <fmt.h>
10
11 size_t fmt_asn1derlength(char *dest,unsigned long long source);
12
14 fmt_asn1derlength encodes an unsigned integer using the ASN.1 DER for
15 encoding tag lengths. This can take from 1 byte (0-0x7f) up to
16 sizeof(source)+1 bytes.
17
18 If dest equals FMT_LEN (i.e. is NULL), fmt_asn1derlength returns the
19 number of bytes it would have written.
20
21 For convenience, fmt.h defines the integer FMT_ASN1LENGTH to be big
22 enough to contain every possible fmt_asn1derlength output.
23
25 scan_asn1derlength(3)
26
27
28
29 fmt_asn1derlength(3)