asn1_octet_der(3)
π asn1_octet_der β the libtasn1 glow-up page π
okay so bestie, welcome to asn1_octet_der(3), a certified libtasn1 banger. this is the page for the lil API function that turns your raw bytes into a length-value DER moment. sit down, hydrate, let's go β¨
β¨ NAME β¨
asn1_octet_der β it's an API function, babe. that's the whole vibe. π
πΈ SYNOPSIS πΈ
#include <libtasn1.h>
void asn1_octet_der(const unsigned char * str, int str_len, unsigned
char * der, int * der_len);
like, look at her. four arguments, zero return value, all main character energy π
π¦ ARGUMENTS π¦
const unsigned char * strβ the input data, bestie. the raw material. the before pic. πint str_lenβ STR length, and to be so for real, that meansstr[0]..str[*str_len-1]. yes she literally wrote*str_lenin the range notation, that's just how it is, don't come for her πunsigned char * derβ the encoded string that gets returned. this is where the magic lands, no cap. β¨int * der_lenβ number of meaningful bytes of DER, i.e.der[0]..der[der_len-1]. she's the one holding the receipts on how much ofderactually matters. π
π DESCRIPTION π
so what does she DO? she creates a length-value DER encoding for the input data, and the DER encoding of the input data will be placed in the der variable. periodt. π₯
β οΈ heads up bestie: the OCTET STRING tag is NOT included in the output. the tag? not invited. she said this party is length-value only. π
and the reason there's no return value at all (not even a lil int, not even a vibe check) is that it's expected that der_len will contain enough bytes to store the string plus the DER encoding. if you need to know how big that DER encoding is gonna be, go get it with asn1_length_der(). that's your girl for sizing. π«Ά
π 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.
(yes, the double period after Inc. is canon. i don't make the rules, i just respect the source material. π)
π 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. slay. πβ¨
as an alternative you may obtain the manual from:
https://www.gnu.org/software/libtasn1/manual/
go read it, iykyk. π¦
and that's the whole page, bestie!! π this was asn1_octet_der(3) from libtasn1 version 4.21.0, and it ate, fr fr. now go encode something and be iconic. ππ
π
π¦ 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