|
1 '\" te |
|
2 .\" Copyright (C) 1998-2003, Carnegie Mellon Univeristy. All Rights Reserved. |
|
3 .\" Portions Copyright (C) 2003, Sun Microsystems, Inc. All Rights Reserved |
|
4 .TH sasl_encode64 3SASL "16 Sep 2003" "SunOS 5.12" "Simple Authentication Security Layer Library Functions" |
|
5 .SH NAME |
|
6 sasl_encode64 \- encode base64 string |
|
7 .SH SYNOPSIS |
|
8 .LP |
|
9 .nf |
|
10 \fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsasl\fR [ \fIlibrary\fR ... ] |
|
11 #include <sasl/saslutil.h> |
|
12 |
|
13 \fBint\fR \fBsasl_encode64\fR(\fBconst char *\fR\fIin\fR, \fBunsigned\fR \fIinlen\fR, \fBchar *\fR\fIout\fR, |
|
14 \fBunsigned\fR \fIoutmax\fR, \fBunsigned *\fR\fIoutlen\fR); |
|
15 .fi |
|
16 |
|
17 .SH DESCRIPTION |
|
18 .sp |
|
19 .LP |
|
20 Use the \fBsasl_encode64()\fR interface to convert an octet string into a base64 string. This routine is useful for SASL profiles that use base64, such as the IMAP (IMAP4) and POP (POP_AUTH) profiles. The output is null-terminated. If \fIoutlen\fR is non-\fINULL\fR, the length is placed in the \fIoutlen\fR. |
|
21 .SH PARAMETERS |
|
22 .sp |
|
23 .ne 2 |
|
24 .mk |
|
25 .na |
|
26 \fB\fIin\fR\fR |
|
27 .ad |
|
28 .RS 10n |
|
29 .rt |
|
30 Input data. |
|
31 .RE |
|
32 |
|
33 .sp |
|
34 .ne 2 |
|
35 .mk |
|
36 .na |
|
37 \fB\fIinlen\fR\fR |
|
38 .ad |
|
39 .RS 10n |
|
40 .rt |
|
41 The length of the input data. |
|
42 .RE |
|
43 |
|
44 .sp |
|
45 .ne 2 |
|
46 .mk |
|
47 .na |
|
48 \fB\fIout\fR\fR |
|
49 .ad |
|
50 .RS 10n |
|
51 .rt |
|
52 The output data. The value of \fIout\fR can be the same as \fIin\fR. However, there must be enough space. |
|
53 .RE |
|
54 |
|
55 .sp |
|
56 .ne 2 |
|
57 .mk |
|
58 .na |
|
59 \fB\fIoutlen\fR\fR |
|
60 .ad |
|
61 .RS 10n |
|
62 .rt |
|
63 The length of the actual output. |
|
64 .RE |
|
65 |
|
66 .sp |
|
67 .ne 2 |
|
68 .mk |
|
69 .na |
|
70 \fB\fIoutmax\fR\fR |
|
71 .ad |
|
72 .RS 10n |
|
73 .rt |
|
74 The maximum size of the output buffer. |
|
75 .RE |
|
76 |
|
77 .SH RETURN VALUES |
|
78 .sp |
|
79 .LP |
|
80 \fBsasl_encode64()\fR returns an integer that corresponds to a SASL error code. |
|
81 .SH ERRORS |
|
82 .sp |
|
83 .ne 2 |
|
84 .mk |
|
85 .na |
|
86 \fB\fBSASL_OK\fR\fR |
|
87 .ad |
|
88 .RS 16n |
|
89 .rt |
|
90 The call to \fBsasl_encode64()\fR was successful. |
|
91 .RE |
|
92 |
|
93 .sp |
|
94 .ne 2 |
|
95 .mk |
|
96 .na |
|
97 \fB\fBSASL_BUFOVER\fR\fR |
|
98 .ad |
|
99 .RS 16n |
|
100 .rt |
|
101 The output buffer was too small. |
|
102 .RE |
|
103 |
|
104 .SH ATTRIBUTES |
|
105 .sp |
|
106 .LP |
|
107 See \fBattributes\fR(5) for descriptions of the following attributes: |
|
108 .sp |
|
109 |
|
110 .sp |
|
111 .TS |
|
112 tab() box; |
|
113 cw(2.75i) |cw(2.75i) |
|
114 lw(2.75i) |lw(2.75i) |
|
115 . |
|
116 ATTRIBUTE TYPEATTRIBUTE VALUE |
|
117 _ |
|
118 Availabilitysystem/library/security/libsasl |
|
119 _ |
|
120 Interface StabilityCommitted |
|
121 _ |
|
122 MT-LevelMT-Safe |
|
123 .TE |
|
124 |
|
125 .SH SEE ALSO |
|
126 .sp |
|
127 .LP |
|
128 \fBsasl_errors\fR(3SASL), \fBattributes\fR(5) |