asn1_get_bit_der(3)

πŸ“¦
version 4.21.0 Β· 5 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, fedora 43, fedora 44, opensuse-leap 16.0, ubuntu resolute, ubuntu stonking

✨ asn1_get_bit_der ✨

okay bestie, welcome to the libtasn1 corner of the man pages πŸ’… this one's asn1_get_bit_der(3), and she's literally an API function, no cap.


πŸŽ€ NAME πŸŽ€

asn1_get_bit_der β€” it's an API function, that's the whole vibe 🫢


πŸ“œ SYNOPSIS πŸ“œ

#include <libtasn1.h>

int asn1_get_bit_der(const unsigned char * der, int der_len, int *
ret_len, unsigned char * str, int str_size, int * bit_len);

like yes, that line break in the middle of int * and ret_len is just how the original wrapped it, we don't question the ancestors πŸ’€


🌸 ARGUMENTS 🌸

  • const unsigned char * der β€” the DER data to decode, and it's holding the BIT SEQUENCE. don't touch, it's const for a reason 🧚
  • int der_len β€” how long that DER data you're decoding is. length. that's it, that's the girl ✨
  • int * ret_len β€” output variable, and she's carrying the length of the DER data. she gets written to, so she's a pointer, periodt.
  • unsigned char * str β€” a pre-allocated output buffer where the decoded BIT SEQUENCE goes to live her best life. you allocate it, not the function, ok? πŸ‘‘
  • int str_size β€” the length of that pre-allocated output buffer you so thoughtfully provided πŸ™ˆ
  • int * bit_len β€” another output variable, this one holding the size of the BIT SEQUENCE. size queen behavior, honestly πŸ“

πŸ’– DESCRIPTION πŸ’–

Extract a BIT SEQUENCE from DER data.

that's it. that's the whole job. she extracts, she slays, she goes home πŸ¦‹


⭐ RETURNS ⭐

ASN1_SUCCESS on success, or an error. like, on success you get ASN1_SUCCESS β€” which is the win β€” and if it's not that, it's an error. lowkey straightforward πŸ”₯


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.

okay so real talk: that copyright line is the whole license situation, keep the notice and you're golden πŸ’–

🌈 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/

and that's the page bestie, go forth and decode 🫢

libtasn1 β€” version 4.21.0 β€” asn1_get_bit_der(3) βœ¨πŸ’–πŸŽ€

πŸ“¦ where this page comes from