com.eruces.teagent.Base64Code
The Base64Code class is used to encode regular data to a base64-encoded string, and to decode a base64-encoded string to regular data.
Static Public Member Functions
| Member | Description |
|---|---|
String encode(byte byteData[]) | The encode method encodes data using base64, returning a base64-encoded string. |
byte[] decode(String strData) | The decode method decodes a base64-encoded string, returning the originial data. |
Member Function Documentation
String encode(byte byteData[])
The encode method encodes data using base64, returning a base64-encoded string.
Parameters
| Parameter | Description |
|---|---|
byteData | A byte array to be encoded. |
Returns: Returns a base64-encoded data string.
byte[] decode(String strData)
The decode method decodes a base64-encoded string, returning the originial data.
Parameters
| Parameter | Description |
|---|---|
strData | A base64-encoded string to be decoded. |
Remark: White space before and after encoded data will be trimmed; input will not be otherwise manipulated.
Returns: A byte array representing the decoded base64 string.