std.base64
Encodes/decodes MIME base64 data.
References:
Wikipedia Base64
RFC 2045
Variables
const
array
:
char
[]
Functions
char
[]
decode
(
char
[]
estr
,
char
[]
buf
)
Decodes str[] and places the result in buf[].
Parameters:
str
string to encode
buf
destination buffer, must be large enough for the result.
Returns:
slice into buf[] representing encoded result
Errors:
Throws Base64Exception on invalid base64 encoding in estr[]. Throws Base64CharException on invalid base64 character in estr[].
uint
decodeLength
(
uint
elen
)
Returns the number of bytes needed to decode an encoded string of this length.
char
[]
encode
(
char
[]
str
,
char
[]
buf
)
Encodes str[] and places the result in buf[].
Parameters:
str
string to encode
buf
destination buffer, must be large enough for the result.
Returns:
slice into buf[] representing encoded result
uint
encodeLength
(
uint
slen
)
Returns the number of bytes needed to encode a string of length slen.
Classes
Base64CharException
:
Base64Exception
Super hierarchy:
Object
->
Exception
->
Base64Exception
->
Base64CharException
Constructors
this
(
char
[]
msg
)
Inherited methods
from
Object
:
factory
,
notifyRegister
,
notifyUnRegister
,
opCmp
,
opEquals
,
print
,
toHash
,
toString
from
Exception
:
print
,
toString
Base64Exception
:
Exception
Super hierarchy:
Object
->
Exception
->
Base64Exception
Direct known subclasses:
Base64CharException
Constructors
this
(
char
[]
msg
)
Inherited methods
from
Object
:
factory
,
notifyRegister
,
notifyUnRegister
,
opCmp
,
opEquals
,
print
,
toHash
,
toString
from
Exception
:
print
,
toString