BIO_DUMP(3)
πΈ NAME πΈ
BIO_dump, BIO_dump_indent, BIO_dump_fp, BIO_dump_indent_fp β hexadecimal printout of arbitrary byte arrays π
Okay bestie, welcome to the BIO_DUMP(3) page π«Ά β itβs literally the manual for dumping raw bytes as hex, and we are keeping every detail, no cap.
β¨ SYNOPSIS β¨
#include <openssl/bio.h>
int
BIO_dump(BIO *b, const char *s, int len);
int
BIO_dump_indent(BIO *b, const char *s, int len, int indent);
int
BIO_dump_fp(FILE *fp, const char *s, int len);
int
BIO_dump_indent_fp(FILE *fp, const char *s, int len, int indent);
π DESCRIPTION π
BIO_dump() prints len bytes starting at s to bio in hexadecimal format. Periodt. π
The first column of output contains the index, in the byte array starting at s, of the first byte shown on the respective output line, expressed as a four-digit hexadecimal number starting at 0000, followed by a dash. After the dash, sixteen bytes of data are printed as two-digit hexadecimal numbers, respecting the order in which they appear in the array s. Another dash is printed after the eighth column. π§
To the right of the hexadecimal representation of the bytes, the same bytes are printed again, this time as ASCII characters. Non-printable ASCII characters are replaced with dots. π
Trailing space characters and NUL bytes are omitted from the main table. If there are any, an additional line is printed, consisting of the len argument as a four-digit hexadecimal number, a dash, and the fixed string <SPACES/NULS>. iykyk β¨
BIO_dump_indent() is similar except that indent space characters are prepended to each output line. If indent is 7 or more, the number of data columns is reduced such that the total width of the output does not exceed 79 characters per line. π¦
BIO_dump_fp() and BIO_dump_indent_fp() are similar except that fwrite(3) is used instead of BIO_write(3). π
π RETURN VALUES π
On success these functions return the total number of bytes written by BIO_write(3) or fwrite(3). If a failure occurs at any point when writing, these functions will stop after having potentially written out partial results, and return -1. not the vibe, but thatβs the contract π
π SEE ALSO π
π¦ HISTORY π¦
BIO_dump()first appeared in SSLeay0.6.5and has been available since OpenBSD2.4. πΈBIO_dump_indent()first appeared in OpenSSL0.9.6and has been available since OpenBSD2.9. β¨BIO_dump_fp()andBIO_dump_indent_fp()first appeared in OpenSSL0.9.8and have been available since OpenBSD4.5. π
Cute little sign-off: this page is from Debian, dated December 20, 2022, and itβs literally BIO_DUMP(3) β slay, bye bestie π«Άπ
π¦ where this page comes from
- opensuse-leap 16.0: libressl-devel-doc 4.1.0-bp160.1.1 Β· OpenSSL
- Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms