Show / Hide Table of Contents

Bcd Class

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

Class for encoding and decoding bytes into BCD (binary coded decimal) format.

C#
public class Bcd : Base16, ITextEncoding
Inheritance object Base16 Bcd
Implements
ITextEncoding

Remarks

BCD is a way to represent decimal data in a format that is both easy to parse and easily human-readable. Each four bits is one decimal digit. The obvious disadvantage is that the data is far less dense. Each byte can only contain less than seven full bits of data.

Properties

Name Description
CharacterSet

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

Methods

Name Description
DecodeText(ReadOnlySpan<char>, Span<byte>)
DecodeText(string)
EncodeBytes(ReadOnlySpan<byte>)
EncodeBytes(ReadOnlySpan<byte>, Span<char>)
In this article
Back to top Generated by DocFX