Class Base64
Base64 utility.
Inheritance
System.Object
Base64
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class Base64 : object
Methods
Decode(String)
Computes the byte representation of a base64 string.
Declaration
public static byte[] Decode(string s)
Parameters
Type | Name | Description |
---|---|---|
System.String | s | The input base64 string. |
Returns
Type | Description |
---|---|
System.Byte[] | The byte array. |
Encode(Byte[])
Computes the base64 representation of a byte array.
Declaration
public static string Encode(byte[] b)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | b | The input byte array. |
Returns
Type | Description |
---|---|
System.String | The base64 string. |
EncodeBuffer(DataBuffer)
Computes the base64 representation of a buffer.
Declaration
public static string EncodeBuffer(DataBuffer buffer)
Parameters
Type | Name | Description |
---|---|---|
DataBuffer | buffer | The input buffer. |
Returns
Type | Description |
---|---|
System.String | The base64 string. |
TryDecode(String, out Byte[])
Computes the byte representation of a base64 string.
Declaration
public static bool TryDecode(string s, out byte[] decoded)
Parameters
Type | Name | Description |
---|---|---|
System.String | s | The input base64 string. |
System.Byte[] | decoded | The byte array. |
Returns
Type | Description |
---|---|
System.Boolean |
|
TryEncode(Byte[], out String)
Computes the base64 representation of a byte array.
Declaration
public static bool TryEncode(byte[] b, out string encoded)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | b | The input byte array. |
System.String | encoded | The base64 string. |
Returns
Type | Description |
---|---|
System.Boolean |
|
TryEncodeBuffer(DataBuffer, out String)
Computes the base64 representation of a buffer.
Declaration
public static bool TryEncodeBuffer(DataBuffer buffer, out string encoded)
Parameters
Type | Name | Description |
---|---|---|
DataBuffer | buffer | The input buffer. |
System.String | encoded | The base64 string. |
Returns
Type | Description |
---|---|
System.Boolean |
|