1
<?xml version="1.0" encoding="latin1" ?>
2
<!DOCTYPE erlref SYSTEM "erlref.dtd">
9
<holder>Ericsson AB, All Rights Reserved</holder>
12
The contents of this file are subject to the Erlang Public License,
13
Version 1.1, (the "License"); you may not use this file except in
14
compliance with the License. You should have received a copy of the
15
Erlang Public License along with this software. If not, it can be
16
retrieved online at http://www.erlang.org/.
18
Software distributed under the License is distributed on an "AS IS"
19
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
20
the License for the specific language governing rights and limitations
23
The Initial Developer of the Original Code is Ericsson AB.
27
<prepared>Ingela Anderton Andin</prepared>
29
<date>2007-02-22</date>
31
<file>base64.sgml</file>
33
<module>base64</module>
34
<modulesummary>Implements base 64 encode and decode, see RFC2045.</modulesummary>
36
<p>Implements base 64 encode and decode, see RFC2045. </p>
40
<name>encode(Data) -> Base64 </name>
41
<name>encode_to_string(Data) -> Base64String</name>
42
<fsummary>Encodes data into base64. </fsummary>
44
<v>Data = string() | binary()</v>
45
<v>Base64 = binary()</v>
46
<v>Base64String = string()</v>
49
<p>Encodes a plain ASCII string into base64. The result will
50
be 33% larger than the data.</p>
54
<name>decode(Base64) -> Data</name>
55
<name>decode_to_string(Base64) -> DataString</name>
56
<name>mime_decode(Base64) -> Data</name>
57
<name>mime_decode_to_string(Base64) -> DataString</name>
58
<fsummary>Decodes a base64 encoded string to data. </fsummary>
60
<v>Base64 = string() | binary()</v>
61
<v>Data = binary()</v>
62
<v>DataString = string()</v>
65
<p>Decodes a base64 encoded string to plain ASCII. The string
66
should only consist of characters in the base64 set, see RFC4648.
67
<c>mime_decode/1</c> and <c>mime_decode_to_string/1</c>
68
strips away illegal characters, while <c>decode/1</c> and
69
<c>decode_to_string/1</c> fails if an illegal charactrer is found.</p>