1<?xml version="1.0" encoding="utf-8" ?>
2<!DOCTYPE erlref SYSTEM "erlref.dtd">
3
4<erlref>
5  <header>
6    <copyright>
7      <year>2007</year><year>2020</year>
8      <holder>Ericsson AB. All Rights Reserved.</holder>
9    </copyright>
10    <legalnotice>
11      Licensed under the Apache License, Version 2.0 (the "License");
12      you may not use this file except in compliance with the License.
13      You may obtain a copy of the License at
14
15          http://www.apache.org/licenses/LICENSE-2.0
16
17      Unless required by applicable law or agreed to in writing, software
18      distributed under the License is distributed on an "AS IS" BASIS,
19      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20      See the License for the specific language governing permissions and
21      limitations under the License.
22
23    </legalnotice>
24
25    <title>base64</title>
26    <prepared>Ingela Anderton Andin</prepared>
27    <docno></docno>
28    <date>2007-02-22</date>
29    <rev></rev>
30    <file>base64.xml</file>
31  </header>
32  <module since="">base64</module>
33  <modulesummary>Provides base64 encode and decode, see
34    RFC 2045.</modulesummary>
35  <description>
36    <p>Provides base64 encode and decode, see
37      <url href="https://www.ietf.org/rfc/rfc2045.txt">RFC 2045</url>.</p>
38  </description>
39
40  <datatypes>
41    <datatype>
42      <name name="base64_alphabet"/>
43      <desc><p>Base 64 Encoding alphabet, see <url href="https://www.ietf.org/rfc/rfc4648.txt">RFC 4648</url>.</p>
44      </desc>
45    </datatype>
46    <datatype>
47      <name name="base64_string"/>
48      <desc><p>Base 64 encoded string.</p>
49      </desc>
50    </datatype>
51    <datatype>
52      <name name="base64_binary"/>
53      <desc><p>Base 64 encoded binary.</p>
54      </desc>
55    </datatype>
56    <datatype>
57      <name name="byte_string"/>
58      <desc><p>Arbitrary sequences of octets.</p>
59      </desc>
60    </datatype>
61  </datatypes>
62
63  <funcs>
64    <func>
65      <name name="decode" arity="1" since=""/>
66      <name name="decode_to_string" arity="1" since=""/>
67      <name name="mime_decode" arity="1" since=""/>
68      <name name="mime_decode_to_string" arity="1" since=""/>
69      <fsummary>Decode a base64 encoded string to data.</fsummary>
70      <type variable="Base64" name_i="1"/>
71      <type variable="Data" name_i="1"/>
72      <type variable="DataString" name_i="2"/>
73      <desc>
74        <p>Decodes a base64-encoded string to plain ASCII. See
75          <url href="https://www.ietf.org/html/rfc4648">RFC 4648</url>.</p>
76        <p><c>mime_decode/1</c> and <c>mime_decode_to_string/1</c> strip away
77          illegal characters, while <c>decode/1</c> and
78          <c>decode_to_string/1</c> only strip away whitespace characters.</p>
79      </desc>
80    </func>
81
82    <func>
83      <name name="encode" arity="1" since=""/>
84      <name name="encode_to_string" arity="1" since=""/>
85      <fsummary>Encode data into base64.</fsummary>
86      <type variable="Data"/>
87      <type variable="Base64" name_i="1"/>
88      <type variable="Base64String"/>
89      <desc>
90        <p>Encodes a plain ASCII string into base64. The result is 33% larger
91          than the data.</p>
92      </desc>
93    </func>
94  </funcs>
95</erlref>
96
97