BIO_F_PREFIX(3ossl)

πŸ’– BIO_F_PREFIX β€” the prefix BIO filter, bestie edition πŸ’–

okay so this is an OpenSSL page (3ossl), and it's all about a little filter that makes your text output look cute and organized. get comfy, we're doing this together 🫢


✨ NAME ✨

BIO_f_prefix, BIO_set_prefix, BIO_set_indent, BIO_get_indent β€” it's the prefix BIO filter, and it's literally here to indent your lines for you πŸ’…


🌸 SYNOPSIS 🌸

#include <openssl/bio.h>

const BIO_METHOD *BIO_f_prefix(void);
long BIO_set_prefix(BIO *b, const char *prefix);
long BIO_set_indent(BIO *b, long indent);
long BIO_get_indent(BIO *b);

πŸ¦‹ DESCRIPTION πŸ¦‹

So BIO_f_cipher() returns the prefix BIO method. (yes that's what the page says, no I'm not fixing it, that's the text, periodt πŸ’€) It's a filter for text output, and the whole vibe is that every line gets automatically prefixed and indented based on whatever the user asked for. main character energy for your strings ✨

The prefix and the indentation are combined. For each line of output going through this filter, here's the order, no cap:

  1. the prefix gets output first
  2. then the amount of additional spaces indicated by the indentation
  3. then the line itself 🌈

By default, there is no prefix, and indentation is set to 0. clean slate energy.

  • BIO_set_prefix() β€” sets the prefix to be used for future lines of text, using prefix. prefix may be NULL, which signifies that there should be no prefix. If prefix isn't NULL, this function makes a copy of it (so it's yours now, it's safe, don't stress πŸŽ€).
  • BIO_set_indent() β€” sets the indentation to be used for future lines of text, using indent. Negative values are not allowed. 🚫
  • BIO_get_indent() β€” gets the current indentation. peek at it, you deserve to know πŸ‘‘

πŸ“ NOTES πŸ“

BIO_set_prefix(), BIO_set_indent() and BIO_get_indent() are implemented as macros. iykyk, that's just how they are 🧚


⭐ RETURN VALUES ⭐

  • BIO_f_prefix() returns the prefix BIO method. that's the whole thing, she's serving πŸ’…
  • BIO_set_prefix() returns 1 if the prefix was correctly set, or <=0 on failure.
  • BIO_set_indent() returns 1 if the prefix was correctly set, or <=0 on failure.
  • BIO_get_indent() returns the current indentation, or a negative value for failure.
bestie listen: <=0 means failure. 1 means slay. don't get it twisted 😭

πŸ‘€ SEE ALSO πŸ‘€

  • bio(7) β€” go read it, it's the lore πŸ“

Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.

Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.


aaaand that's the whole page, bestie πŸ’– this was OpenSSL 3ossl, version 3.5.9, dated 2026-09-29 β€” mwah, go forth and prefix your lines, you absolute icon πŸ‘‘πŸ’…βœ¨

πŸ“¦ where this page comes from