GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
BIO_DUMP(3) FreeBSD Library Functions Manual BIO_DUMP(3)

BIO_dump, BIO_dump_indent, BIO_dump_fp, BIO_dump_indent_fp
hexadecimal printout of arbitrary byte arrays

#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);

BIO_dump() prints len bytes starting at s to bio in hexadecimal format.

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>”.

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).

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.

hexdump(1), BIO_new(3), BIO_write(3)

BIO_dump() first appeared in SSLeay 0.6.5 and has been available since OpenBSD 2.4.

BIO_dump_indent() first appeared in OpenSSL 0.9.6 and has been available since OpenBSD 2.9.

BIO_dump_fp() and BIO_dump_indent_fp() first appeared in OpenSSL 0.9.8 and have been available since OpenBSD 4.5.

January 15, 2022 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.