Base64 Class

Definition

Converts between binary data and UTF-8 encoded text that is represented in base 64.

public ref class Base64 abstract sealed
public static class Base64
type Base64 = class
Public Class Base64
Inheritance
Base64

Methods

DecodeFromUtf8(ReadOnlySpan<Byte>, Span<Byte>, Int32, Int32, Boolean)

Decodes the span of UTF-8 encoded text represented as base 64 into binary data. If the input is not a multiple of 4, it will decode as much as it can, to the closest multiple of 4.

DecodeFromUtf8InPlace(Span<Byte>, Int32)

Decodes the span of UTF-8 encoded text in base 64 (in-place) into binary data. The decoded binary output is smaller than the text data contained in the input (the operation deflates the data). If the input is not a multiple of 4, the method will not decode any data.

EncodeToUtf8(ReadOnlySpan<Byte>, Span<Byte>, Int32, Int32, Boolean)

Encodes the span of binary data into UTF-8 encoded text represented as base 64.

EncodeToUtf8InPlace(Span<Byte>, Int32, Int32)

Encodes the span of binary data (in-place) into UTF-8 encoded text represented as base 64. The encoded text output is larger than the binary data contained in the input (the operation inflates the data).

GetMaxDecodedFromUtf8Length(Int32)

Returns the maximum length (in bytes) of the result if you were to decode base-64 encoded text within a byte span with the specified length.

GetMaxEncodedToUtf8Length(Int32)

Returns the maximum length (in bytes) of the result if you were to encode binary data within a byte span with the specified length.

IsValid(ReadOnlySpan<Byte>)

Validates that the specified span of UTF-8 text is comprised of valid base-64 encoded data.

IsValid(ReadOnlySpan<Byte>, Int32)

Validates that the specified span of UTF-8 text is comprised of valid base-64 encoded data.

IsValid(ReadOnlySpan<Char>)

Validates that the specified span of text is comprised of valid base-64 encoded data.

IsValid(ReadOnlySpan<Char>, Int32)

Validates that the specified span of text is comprised of valid base-64 encoded data.

Applies to