Class SlotMetadata

java.lang.Object
com.yubico.yubikit.piv.SlotMetadata

public class SlotMetadata extends Object
Metadata about a key in a slot.
  • Constructor Details

    • SlotMetadata

      public SlotMetadata(KeyType keyType, PinPolicy pinPolicy, TouchPolicy touchPolicy, boolean generated, byte[] publicKeyEncoded)
  • Method Details

    • getKeyType

      public KeyType getKeyType()
      Returns the type of the key stored in a slot.
    • getPinPolicy

      public PinPolicy getPinPolicy()
      Returns the PIN policy for using the key.
    • getTouchPolicy

      public TouchPolicy getTouchPolicy()
      Returns the touch policy for using the key.
    • isGenerated

      public boolean isGenerated()
      Whether the key was generated on the YubiKey or imported. A generated key can be attested, and exists only in a single YubiKey.
      Returns:
      true if the key was generated on the YubiKey
    • getPublicKeyValues

      public com.yubico.yubikit.core.keys.PublicKeyValues getPublicKeyValues()
      Returns the public key corresponding to the key in the slot.
    • getPublicKey

      @Deprecated public PublicKey getPublicKey()
      Deprecated.
      Use getPublicKeyValues().toPublicKey() instead.
      Returns the public key corresponding to the key in the slot.