1scan_asn1dertag(3) Library Functions Manual scan_asn1dertag(3)
2
3
4
6 scan_asn1dertag - decode an unsigned integer from ASN.1 DER length
7 encoding
8
10 #include <scan.h>
11
12 size_t scan_asn1dertag(const char *src,size_t len,unsigned long long
13 *dest);
14
16 scan_asn1dertag decodes an unsigned integer in ASN.1 DER tag encoding
17 from a memory area holding binary data. It writes the decode value in
18 dest and returns the number of bytes it read from src.
19
20 scan_asn1dertag never reads more than len bytes from src. If the
21 sequence is longer than that, or the memory area contains an invalid
22 sequence, scan_asn1dertag returns 0 and does not touch dest.
23
24 The length of the longest ASN.1 DER length sequence is 128 bytes. In
25 practice the largest sequence is sizeof(*dest)+1.
26
28 fmt_asn1dertag(3)
29
30
31
32 scan_asn1dertag(3)