Class Base64
Provides Base64 encoding and decoding (RFC 2045 §6.8). The decode method is tolerant of embedded whitespace (CRLF, spaces) as permitted in MIME bodies.
Inherited Members
Namespace: DRIT.Mail.Rfc.Shared
Assembly: DRIT.Mail.dll
Syntax
public static class Base64
Methods
View SourceDecode(string)
Decodes a Base64 string to binary data. Whitespace characters (space, tab, CR, LF) within the input are silently skipped, as permitted by RFC 2045 §6.8. Malformed input is handled gracefully.
Declaration
public static byte[] Decode(string text)
Parameters
| Type | Name | Description |
|---|---|---|
| string | text | Specifies the text value. |
Returns
| Type | Description |
|---|---|
| byte[] |
Encode(byte[])
Encodes binary data to a Base64 string without line wrapping.
Declaration
public static string Encode(byte[] data)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | data | The data to process. |
Returns
| Type | Description |
|---|---|
| string |