asn1_encode_sequence(9)
π NAME π
hey bestie, welcome to the asn1_encode_sequence(9) page from the Kernel API Manual π
this is the one that wraps a byte stream in an ASN.1 SEQUENCE.
asn1_encode_sequenceβ wrap a byte stream in an ASN.1 SEQUENCE
β¨ SYNOPSIS β¨
unsigned char * asn1_encode_sequence (unsigned char *data , const
unsigned char *end_data , const unsigned char *seq , int len );
πΈ ARGUMENTS πΈ
okay so these are the four little besties this function takes:
dataβ pointer to encode at.end_dataβ end of data pointer, points one beyond last usable byte indata.seqβ data to be encoded as a sequence.lenβ length of the data to be encoded as a sequence.
π¦ DESCRIPTION π¦
so this function fills in a sequence β¨ if you wanna encode in place, pass NULL for seq and -1 for len; then call it again once the length is known (still with NULL for seq). and to avoid having to keep both before and after pointers, the repeat call expects data pointing to where the first encode placed it. literally that's the whole vibe.
π SEE ALSO π
- Kernel file
./lib/asn1_encoder.c asn1_encode_integer(9)asn1_encode_oid(9)asn1_encode_length(9)asn1_encode_tag(9)asn1_encode_octet_string(9)asn1_encode_boolean(9)
mwah π β from ./lib, October 2026; asn1_encode_sequence(9) out! π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms