|
NAME | SYNOPSIS | DESCRIPTION | RETURN VALUE | SEE ALSO | AUTHOR | COLOPHON |
|
|
|
AUDIT_ENCODE_VALUE(3) Linux Audit API AUDIT_ENCODE_VALUE(3)
audit_encode_value - encode bytes as an ASCII hexadecimal string
#include <libaudit.h>
char *audit_encode_value(char *final, const char *buf, unsigned int size);
audit_encode_value() encodes size bytes from buf as an uppercase
ASCII hexadecimal string. Each input byte is written as two
hexadecimal digits. The input does not have to be NUL-terminated
and may contain embedded NUL bytes.
final is the caller-provided output buffer. It must be at least 2
* size + 1 bytes long to hold the encoded value and its
terminating NUL byte. size is the number of bytes to encode from
buf, not necessarily the result of strlen(3).
If buf is NULL, audit_encode_value() writes an empty string to
final.
e.g.: "foo bar" is encoded as "666F6F20626172". "\1\2\3\4" is
encoded as "01020304".
Returns final on success. If final is NULL, NULL is returned.
audit_encode_nv_string(3), audit_value_needs_encoding(3).
Steve Grubb
This page is part of the audit (Linux Audit) project. Information
about the project can be found at
⟨http://people.redhat.com/sgrubb/audit/⟩. If you have a bug report
for this manual page, send it to linux-audit@redhat.com. This
page was obtained from the project's upstream Git repository
⟨https://github.com/linux-audit/audit-userspace.git⟩ on
2026-05-24. (At that time, the date of the most recent commit
that was found in the repository was 2026-05-17.) If you discover
any rendering problems in this HTML version of the page, or you
believe there is a better or more up-to-date source for the page,
or you have corrections or improvements to the information in this
COLOPHON (which is not part of the original manual page), send a
mail to man-pages@man7.org
Red Hat May 2026 AUDIT_ENCODE_VALUE(3)
Pages that refer to this page: audit_encode_nv_string(3), audit_value_needs_encoding(3)