Class SlotMetadata


  • public class SlotMetadata
    extends java.lang.Object
    Metadata about a key in a slot.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      KeyType getKeyType()
      Returns the type of the key stored in a slot.
      PinPolicy getPinPolicy()
      Returns the PIN policy for using the key.
      java.security.PublicKey getPublicKey()
      Returns the public key corresponding to the key in the slot.
      TouchPolicy getTouchPolicy()
      Returns the touch policy for using the key.
      boolean isGenerated()
      Whether the key was generated on the YubiKey or imported.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SlotMetadata

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

      • 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
      • getPublicKey

        public java.security.PublicKey getPublicKey()
        Returns the public key corresponding to the key in the slot.