File: base64.3

package info (click to toggle)
erlang-manpages 1%3A12.b.3-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 4,188 kB
  • ctags: 2
  • sloc: makefile: 68; perl: 30; sh: 15
file content (56 lines) | stat: -rw-r--r-- 1,098 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
.TH base64 3 "stdlib  1.15.3" "Ericsson AB" "ERLANG MODULE DEFINITION"
.SH MODULE
base64 \- Implements base 64 encode and decode, see RFC2045\&.
.SH DESCRIPTION
.LP
Implements base 64 encode and decode, see RFC2045\&. 

.SH EXPORTS
.LP
.B
encode(Data) -> Base64 
.br
.B
encode_to_string(Data) -> Base64String
.br
.RS
.TP
Types
Data = string() | binary()
.br
Base64 = binary()
.br
Base64String = string()
.br
.RE
.RS
.LP
Encodes a plain ASCII string into base64\&. The result will be 33% larger than the data\&.
.RE
.LP
.B
decode(Base64) -> Data
.br
.B
decode_to_string(Base64) -> DataString
.br
.B
mime_decode(Base64) -> Data
.br
.B
mime_decode_to_string(Base64) -> DataString
.br
.RS
.TP
Types
Base64 = string() | binary()
.br
Data = binary()
.br
DataString = string()
.br
.RE
.RS
.LP
Decodes a base64 encoded string to plain ASCII\&. The string should only consist of characters in the base64 set, see RFC4648\&. \fImime_decode/1\fR and \fImime_decode_to_string/1\fR strips away illegal characters, while \fIdecode/1\fR and \fIdecode_to_string/1\fR fails if an illegal charactrer is found\&.
.RE