Show / Hide Table of Contents

Base16 Class

Namespace: Yubico.Core.Buffers Assembly: Yubico.Core.dll

Class for encoding and decoding bytes into base-16 encoded text, otherwise known as hexadecimal.

C#
public class Base16 : ITextEncoding
Inheritance object Base16
Bcd
Hex
ModHex
Implements
ITextEncoding

Remarks

This base class is a fully functional encoder/decoder for base-16, also known as hexadecimal. The class Hex is an alias so that code using that class can continue unmodified. New code should use this class.

See RFC4648 for details (https://datatracker.ietf.org/doc/html/rfc4648) on base-16.

Properties

Name Description
CharacterSet

The set of characters that correspond to numbers 0 - 16.

DefaultLowerCase

Indicates the default case of characters for this encoding.

Methods

Name Description
Decode(ReadOnlySpan<char>, Span<byte>)

Decode the string into data.

Decode(string)

Decode the string into a byte array.

DecodeText(ReadOnlySpan<char>, Span<byte>)

Decode the string into data.

DecodeText(string)

Decode the string into a byte array.

Encode(ReadOnlySpan<byte>)

Encode the byte collection into a string representation.

Encode(ReadOnlySpan<byte>, Span<char>)

Encode the byte collection into encoded.

EncodeBytes(ReadOnlySpan<byte>)

Encode the byte collection into a string representation.

EncodeBytes(ReadOnlySpan<byte>, Span<char>)

Encode the byte collection into encoded.

In this article
Back to top Generated by DocFX