scan_asn1dertag(3)
πΈ scan_asn1dertag β a libowfat moment π
okay bestie, welcome to the Library Functions Manual, specifically the scan_asn1dertag(3) page β¨ β yes the manual name is literally right there in the header, we're not copy-pasting it, we're referencing it, periodt.
β¨ NAME β¨
scan_asn1dertag β decode an unsigned integer from ASN.1 DER length encoding π
π¦ SYNTAX π¦
lowkey the whole thing is this:
#include <libowfat/scan.h>
size_t scan_asn1dertag(const char *src,size_t len,unsigned long long
*dest);
π DESCRIPTION π
so scan_asn1dertag decodes an unsigned integer in ASN.1 DER tag encoding from a memory area holding binary data. it writes the decoded value into dest and returns the number of bytes it read from src. that's the whole vibe. it's giving scanner. π₯
and listen, it's polite about it: scan_asn1dertag never reads more than len bytes from src. if the sequence is longer than that, or if the memory area contains an invalid sequence, it returns 0 and does not touch dest. so likeβ¦ no mess, no drama, dest stays exactly how it was. iconic behavior honestly. π
okay the numbers part, pay attention bestie: the length of the longest ASN.1 DER length sequence is128bytes. in practice the largest sequence issizeof(*dest)+1. π«Ά
π SEE ALSO π
fmt_asn1dertag(3)β the other half of the duo, go say hi π
aaaand that's the page!! β remember: scan_asn1dertag(3), from the Library Functions Manual, in all its libowfat glory β no version stamp, no date, just vibes and a signature line that says the exact same thing as the top did π. mwah, go decode something. ππ
π¦ where this page comes from
- alpine 3.24: libowfat-doc 0.34-r0 Β· GPL-2.0-only
- debian bookworm: libowfat-dev 0.32-4 Β· GPL-2.0-only
- debian trixie: libowfat-dev 0.32-5 Β· GPL-2.0-only
- nixos 26.05: libowfat 0.34
- nixpkgs unstable: libowfat 0.34
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- ubuntu noble: libowfat-dev 0.32-4.1build1 Β· GPL-2.0-only
- ubuntu questing: libowfat-dev 0.32-5
- ubuntu resolute: libowfat-dev 0.34-2 Β· GPL-2.0-only
- ubuntu stonking: libowfat-dev 0.34-2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms