SlotAccessCode Class
Namespace: Yubico.YubiKey.Otp Assembly: Yubico.YubiKey.dllContainer for a YubiKey OTP Slot access code.
C#
public class SlotAccessCode : Object
Inheritance
System.Object
SlotAccessCode
Remarks
Access codes must be exactly six bytes when used in the YubiKey protocol. This helper-class assures that the access code does not exceed the maximum length, and pads the code with zeros (0x00) if less than six bytes are specified.
This class has an explicit operator that allows you to cast a byte array as a SlotAccessCode if that is more convenient than constructing one.
Constructors
Name | Description |
---|---|
SlotAccessCode() | Constructs a SlotAccessCode instance with an empty (all zeros) code. |
SlotAccessCode(ReadOnlyMemory<Byte>) | Constructs a SlotAccessCode instance using the bytes in the collection. |
Fields
Name | Description |
---|---|
MaxAccessCodeLength | Constant giving a reference to the maximum length of an access code. |
Operators
Name | Description |
---|---|
Explicit(Byte[] to SlotAccessCode) | Explicit operator to allow a byte array to be used as a parameter for methods expecting a SlotAccessCode instance. |