Package | impression.utilities |
Class | public class Base64 |
Inheritance | Base64 ![]() |
Some of the algorithms used here are based on code from the AS3 Crypto library, located at http://code.google.com/p/as3crypto
Property | Defined By | ||
---|---|---|---|
codePage : String [static]
Identifies the code page to use when decoding non-UTF8 strings containing
"high ascii" characters. | Base64 |
Method | Defined By | ||
---|---|---|---|
decodeToByteArray(base64String:String):ByteArray [static]
Decodes a Base64-encoded string and returns the result. | Base64 | ||
decodeToString(base64String:String, decodeAsUTF:Boolean = true):String [static]
Decodes a Base64-encoded string and returns the string result. | Base64 | ||
encode(source:*):String [static]
Returns a Base64-encoded string. | Base64 |
codePage | property |
codePage:String
Identifies the code page to use when decoding non-UTF8 strings containing "high ascii" characters. The empty string ("") specifies the default code page for the system.
The default value is ""
.
public static function get codePage():String
public static function set codePage(value:String):void
decodeToByteArray | () | method |
public static function decodeToByteArray(base64String:String):ByteArray
Decodes a Base64-encoded string and returns the result.
Parameters
base64String:String — The string to decode.
|
ByteArray — A ByteArray containing the decoded data from base64String .
|
decodeToString | () | method |
public static function decodeToString(base64String:String, decodeAsUTF:Boolean = true):String
Decodes a Base64-encoded string and returns the string result.
This method invokes the decodeToByteArray
method
and then returns the result of calling a string conversion
method on the resulting ByteArray.
Parameters
base64String:String — The string to decode.
| |
decodeAsUTF:Boolean (default = true ) — An optional boolean expression specifying how the decoded ByteArray
should be converted to a String. If this value is true (the default), the
readUTFBytes method will be used to convert the ByteArray to a String. If
this value is false , the readMultiByte method will be used for
conversion. Note that in the second case, the value of the codePage property
is used to determine how to process "high ascii" characters.
|
String — A string containing the decoded data from base64String .
|
See also
encode | () | method |
public static function encode(source:*):String
Returns a Base64-encoded string.
Parameters
source:* — Expression identifying the item to encode. source can be one of
the following types:
|
String — A String containing the Base64-encoded data from source .
|