Bcd Class
Namespace: Yubico.Core.Buffers Assembly: Yubico.Core.dllClass for encoding and decoding bytes into BCD (binary coded decimal) format.
C#
public class Bcd : Base16, ITextEncoding
Implements
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.
Constructors
Name | Description |
---|---|
Bcd() |
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>) |