asn1_length_der(3)
π NAME π
asn1_length_der β bestie, it's an API function β¨
πΈ SYNOPSIS πΈ
#include <libtasn1.h>
void asn1_length_der(unsigned long int len, unsigned char * der, int *
der_len);
π ARGUMENTS π
unsigned long int lenβ the value you wanna convert, periodt. πunsigned char * derβ the buffer that's gonna hold the returned encoding (and lowkey it's allowed to beNULL).int * der_lenβ how many meaningful bytes of ANS, akader[0]..der[der_len-1]. π¦
β¨ DESCRIPTION β¨
Okay so what this does: it creates the DER encoding of the length value you hand it. That's the whole vibe. π«Ά
Real talk though β your der buffer has to have enough room for the output. Like, no cap, it will not grow itself for you, that's on you bestie. π
The maximum length this function will encode is ASN1_MAX_LENGTH_SIZE. That's the ceiling, the limit, the final boss. π
And here's the little trick iykyk: if you just wanna know the size of the DER encoding before you commit, pass a NULL value for der. It's giving "window shopping before you buy". ποΈπ
π COPYRIGHT π
Copyright Β© 2006-2025 Free Software Foundation, Inc..
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. Slay, honestly. π
π SEE ALSO π
The full documentation for libtasn1 is maintained as a Texinfo manual. If the info and libtasn1 programs are properly installed at your site, the command
info libtasn1
should give you access to the complete manual. πβ¨
As an alternative you may obtain the manual from:
https://www.gnu.org/software/libtasn1/manual/
okay that's the whole page bestie, go forth and encode those lengths π
this was libtasn1 version 4.21.0, page asn1_length_der(3) β mwah, bye, love u, stan libtasn1 πππ§
π¦ where this page comes from
- alpine 3.22: libtasn1-doc 4.21.0-r0 Β· LGPL-2.1-or-later
- alpine 3.23: libtasn1-doc 4.21.0-r0 Β· LGPL-2.1-or-later
- alpine 3.24: libtasn1-doc 4.21.0-r0 Β· LGPL-2.1-or-later
- arch rolling: libtasn1 4.21.0-1 Β· GPL-3.0-or-later AND LGPL-2.1-or-later AND GFDL-1.3-or-later
- fedora 43: libtasn1-devel 4.21.0-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: libtasn1-devel 4.21.0-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: libtasn1-devel 4.21.0-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: libtasn1-devel 4.21.0-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: libtasn1-devel 4.21.0-160000.1.1 Β· GFDL-1.3-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: libtasn1-devel 4.21.0-160000.1.1 Β· GFDL-1.3-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: libtasn1-devel 4.21.0-160000.1.1 Β· GFDL-1.3-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: libtasn1-devel 4.21.0-160000.1.1 Β· GFDL-1.3-or-later AND LGPL-2.1-or-later
- ubuntu resolute: libtasn1-6-dev 4.21.0-2
- ubuntu stonking: libtasn1-6-dev 4.21.0-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms