Skip to content

Normalize Method ​

Definition ​

  • Namespace: JASE.Crypto
  • Assembly: JASE.Crypto.dll

Overloads ​

NameDescription
string Normalize(ReadOnlySpan<char> input)Normalizes Base32 text into a canonical RFC 4648 representation.
int Normalize(ReadOnlySpan<char> input, Span<char> buffer)Normalizes Base32 text into a canonical RFC 4648 representation.

string Normalize(ReadOnlySpan<char> input) ​

csharp
string Normalize(ReadOnlySpan<char> input)

Normalizes Base32 text into a canonical RFC 4648 representation.

Parameters ​

NameDescription
inputThe Base32 text to normalize. This method accepts mixed case and may include common formatting characters such as whitespace and separators.

Returns ​

The Base32 string

Remarks ​

Normalization performs the following steps:

Removes whitespace characters (space, tab, CR, LF).Removes common separators (-, _, :).Converts letters to uppercase using System.Char.ToUpperInvariant(System.Char).Preserves padding characters ('=') if present, but only at the end.

int Normalize(ReadOnlySpan<char> input, Span<char> buffer) ​

csharp
int Normalize(ReadOnlySpan<char> input, Span<char> buffer)

Normalizes Base32 text into a canonical RFC 4648 representation.

Parameters ​

NameDescription
bufferDestination buffer that receives the normalized characters. The buffer must be at least input.Length, since normalization never expands the input.
inputThe Base32 text to normalize. This method accepts mixed case and may include common formatting characters such as whitespace and separators.

Returns ​

The number of characters written to buffer.

Remarks ​

Normalization performs the following steps:

Removes whitespace characters (space, tab, CR, LF).Removes common separators (-, _, :).Converts letters to uppercase using System.Char.ToUpperInvariant(System.Char).Preserves padding characters ('=') if present, but only at the end.