SASL_ENCODE(3)
β¨ SASL_ENCODE(3) β¨
okay bestie, welcome to the Cyrus SASL docs, this one's the sasl_encode page and it's genuinely so useful, come sit with me π
πΈ SYNOPSIS πΈ
#include <sasl/sasl.h>
int sasl_encode(sasl_conn_t *conn,
const char * input,
unsigned inputlen,
const char ** output,
unsigned * outputlen);
int sasl_encodev(sasl_conn_t *conn,
const struct iovec * invec,
unsigned numiov,
const char ** output,
unsigned * outputlen);
like, look at those signatures, they're giving clean interface energy π
π¦ DESCRIPTION π¦
so sasl_encode encodes data that you're about to send off to a remote host β and not just any remote host, one you've already had a successful authentication session with. no cap, that part matters π₯
if there's a negotiated security layer happening, the data gets signed/encrypted, and then you send the output to the remote host without modification. literally do not touch it, bestie, just pass it along π
and if there's no security layer? then the output is identical to the input. same vibes, no glow-up, periodt.
sasl_encodev does the same thing, but for a struct iovec instead of a character buffer. iconic versatility honestly π
int sasl_encode(sasl_conn_t *conn,
const char * input,
unsigned inputlen,
const char ** output,
unsigned * outputlen);
π Parameters π
connβ is the SASL connection contextoutputβ contains the decoded data and is allocated/freed by the library.outputlenβ length of output.
int sasl_encodev(sasl_conn_t *conn,
const struct iovec * invec,
unsigned numiov,
const char ** output,
unsigned * outputlen);
π Parameters π
connβ is the SASL connection contextoutputβ contains the decoded data and is allocated/freed by the library.outputlenβ length of output.
not me pointing out that output is allocated AND freed by the library β so don't you dare try to free it yourself, that's their job, let them cook π«Ά
β RETURN VALUE β
SASL callback functions should return SASL return codes. See sasl.h for a complete list. SASL_OK indicates success. π
other return codes indicate errors and should be handled. do not ignore them, fr fr, handle your errors bestie π
π SEE ALSO π
RFC 4422, :saslman:sasl(3), sasl_decode(3), sasl_errors(3)
π AUTHOR π
The Cyrus Team
πΈ COPYRIGHT πΈ
1993-2016, The Cyrus Team
and that's the whole page, bestie!! this was Cyrus SASL 2.1.28, dated February 18, 2022 β go forth and encode responsibly, mwah ππ¦β¨
π¦ where this page comes from
- alpine 3.22: cyrus-sasl-doc 2.1.28-r8 Β· BSD-3-Clause-Attribution AND BSD-4-Clause
- alpine 3.23: cyrus-sasl-doc 2.1.28-r9 Β· BSD-3-Clause-Attribution AND BSD-4-Clause
- alpine 3.24: cyrus-sasl-doc 2.1.28-r9 Β· BSD-3-Clause-Attribution AND BSD-4-Clause
- centos-stream 10: cyrus-sasl-devel 2.1.28-27.el10 Β· BSD-Attribution-HPND-disclaimer
- fedora 43: cyrus-sasl-devel 2.1.28-33.fc43 Β· BSD-Attribution-HPND-disclaimer
- fedora 43: cyrus-sasl-devel 2.1.28-33.fc43 Β· BSD-Attribution-HPND-disclaimer
- fedora 44: cyrus-sasl-devel 2.1.28-35.fc44 Β· BSD-Attribution-HPND-disclaimer
- fedora 44: cyrus-sasl-devel 2.1.28-35.fc44 Β· BSD-Attribution-HPND-disclaimer
- opensuse-leap 16.0: cyrus-sasl-bdb-devel 2.1.28-160000.4.1 Β· BSD-4-Clause
- opensuse-leap 16.0: cyrus-sasl-bdb-devel 2.1.28-160000.4.1 Β· BSD-4-Clause
- opensuse-leap 16.0: cyrus-sasl-bdb-devel 2.1.28-160000.4.1 Β· BSD-4-Clause
- opensuse-leap 16.0: cyrus-sasl-bdb-devel 2.1.28-160000.4.1 Β· BSD-4-Clause
- opensuse-leap 16.0: cyrus-sasl-devel 2.1.28-160000.4.1 Β· BSD-4-Clause
- opensuse-leap 16.0: cyrus-sasl-devel 2.1.28-160000.4.1 Β· BSD-4-Clause
- opensuse-leap 16.0: cyrus-sasl-devel 2.1.28-160000.4.1 Β· BSD-4-Clause
- opensuse-leap 16.0: cyrus-sasl-devel 2.1.28-160000.4.1 Β· BSD-4-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms