Table of Contents

Class Base32Encoding

Namespace
Tharga.Toolkit
Assembly
Tharga.Toolkit.dll

Provides RFC 4648 Base32 encoding and decoding using the standard alphabet (A-Z, 2-7).

public static class Base32Encoding
Inheritance
Base32Encoding
Inherited Members

Methods

Decode(string)

Decodes a Base32 string back to a byte array. Case-insensitive.

public static byte[] Decode(string input)

Parameters

input string

The Base32-encoded string to decode.

Returns

byte[]

The decoded bytes, or an empty array if the input is null or whitespace.

Exceptions

FormatException

Thrown when the input contains invalid Base32 characters.

Encode(byte[])

Encodes a byte array to a Base32 string with padding.

public static string Encode(byte[] data)

Parameters

data byte[]

The data to encode.

Returns

string

A Base32-encoded string, or empty if the input is null or empty.