Table of Contents

Class PivDataTagExtensions

Namespace
Yubico.YubiKey.Piv
Assembly
Yubico.YubiKey.dll

Extension methods to operate on the PivDataTag enum.

public static class PivDataTagExtensions
Inheritance
object
PivDataTagExtensions

Methods

IsValidEncodingForPut(PivDataTag, ReadOnlyMemory<byte>)

Is the given encoding valid for PUT DATA using the specified tag.

public static bool IsValidEncodingForPut(this PivDataTag tag, ReadOnlyMemory<byte> encoding)

Parameters

tag PivDataTag

The tag to check.

encoding ReadOnlyMemory<byte>

The encoding to check.

Returns

bool

A boolean, true if the encoding follows the defined encoding format, and false otherwise.

Remarks

Each tag has a defined encoding format for the data to PUT. This method will verify that the data follows the correct format. It does not verify the content, it simply verifies the format.

IsValidTagForPut(PivDataTag)

Is the given tag allowed to be used in a standard version of PUT DATA.

public static bool IsValidTagForPut(this PivDataTag tag)

Parameters

tag PivDataTag

The tag to check.

Returns

bool

A boolean, true if the tag is allowed to be used in PUT DATA, and false otherwise.