Packagecom.dynamicflash.util
Classpublic class Base64

Utility class providing Base64 encoding/decoding.
Provides base64 encoding and decoding for strings and ByteArray for byte safe transmission.

The Base64 class is released under the MIT license.
Copyright (c) 2006 Steve Webster
Base64 - 1.1.0 - http://dynamicflash.com/goodies/base64/
Branch:
- Base64 - 1.1.1.CB - http://flashden.net/ourben
Modified:
- Removed creator
- Added ASDoc comments
- Modified version const to reflect revision
Revision Author:
- Ben Charnock



Public Methods
 MethodDefined by
  
decode(data:String):String
[static] Decodes a base64 string into its ANSI representation.
Base64
  
decodeToByteArray(data:String):ByteArray
[static] Decodes a base64 string into an array of bytes.
Base64
  
encode(data:String):String
[static] Encodes a string into its base64 representation.
Base64
  
encodeByteArray(data:ByteArray):String
[static] Encodes a bytearray into its base64 representation.
Base64
Public Constants
 ConstantDefined by
  version : String = "1.1.1CB"
[static] The Base64 version.
Base64
Method detail
decode()method
public static function decode(data:String):String

Decodes a base64 string into its ANSI representation.

Parameters
data:String — A base64 string to decode.

Returns
String — A decoded string copy of the input data string.
decodeToByteArray()method 
public static function decodeToByteArray(data:String):ByteArray

Decodes a base64 string into an array of bytes.

Parameters
data:String — A base64 string to decode.

Returns
ByteArray — A decoded ByteArray copy of the input data string.
encode()method 
public static function encode(data:String):String

Encodes a string into its base64 representation.

Parameters
data:String — A string to encode.

Returns
String — A base64 encoded copy of the input data string.
encodeByteArray()method 
public static function encodeByteArray(data:ByteArray):String

Encodes a bytearray into its base64 representation.

Parameters
data:ByteArray — A ByteArray containing the bytes to encode.

Returns
String — A base64 encoded copy of the input data ByteArray.
Constant detail
versionconstant
public static const version:String = "1.1.1CB"

The Base64 version.