Class Base64NoPad
A codec for Base-64 (RFC 4648) with no padding.
Inherited Members
Namespace: Ipfs
Assembly: Ipfs.Core.dll
Syntax
public static class Base64NoPad
Remarks
A codec for Base-64, Encode(Byte[]) and Decode(String). Adds the extension method ToBase64NoPad(Byte[]) to encode a byte array and FromBase64NoPad(String) to decode a Base-64 string.
Methods
| Improve this Doc View SourceDecode(String)
Converts the specified String, which encodes binary data as base 64 digits, to an equivalent 8-bit unsigned integer array.
Declaration
public static byte[] Decode(string s)
Parameters
Type | Name | Description |
---|---|---|
String | s | The base 64 string to convert. |
Returns
Type | Description |
---|---|
Byte[] | An array of 8-bit unsigned integers that is equivalent to |
Encode(Byte[])
Converts an array of 8-bit unsigned integers to its equivalent string representation that is encoded with base-64 characters.
Declaration
public static string Encode(byte[] bytes)
Parameters
Type | Name | Description |
---|---|---|
Byte[] | bytes | An array of 8-bit unsigned integers. |
Returns
Type | Description |
---|---|
String | The string representation, in base 64, of the contents of |
FromBase64NoPad(String)
Converts the specified String, which encodes binary data as base 64 digits, to an equivalent 8-bit unsigned integer array.
Declaration
public static byte[] FromBase64NoPad(this string s)
Parameters
Type | Name | Description |
---|---|---|
String | s | The base 64 string to convert. |
Returns
Type | Description |
---|---|
Byte[] | An array of 8-bit unsigned integers that is equivalent to |
ToBase64NoPad(Byte[])
Converts an array of 8-bit unsigned integers to its equivalent string representation that is encoded with base-64 digits.
Declaration
public static string ToBase64NoPad(this byte[] bytes)
Parameters
Type | Name | Description |
---|---|---|
Byte[] | bytes | An array of 8-bit unsigned integers. |
Returns
Type | Description |
---|---|
String | The string representation, in base 64, of the contents of |