Class PivPrivateKey

java.lang.Object
com.yubico.yubikit.piv.jca.PivPrivateKey
All Implemented Interfaces:
Serializable, Key, PrivateKey, Destroyable

public abstract class PivPrivateKey extends Object implements PrivateKey, Destroyable
See Also:
  • Field Details

    • pin

      @Nullable protected char[] pin
  • Constructor Details

    • PivPrivateKey

      protected PivPrivateKey(Slot slot, KeyType keyType, @Nullable PinPolicy pinPolicy, @Nullable TouchPolicy touchPolicy, @Nullable char[] pin)
  • Method Details

    • getSlot

      public Slot getSlot()
      Get the PIV slot where the private key is stored.
    • getPinPolicy

      @Nullable public PinPolicy getPinPolicy()
      Get the PIN policy of the key, if available.
    • getTouchPolicy

      @Nullable public TouchPolicy getTouchPolicy()
      Get the Touch policy of the key, if available.
    • setPin

      public void setPin(@Nullable char[] pin)
      Sets the PIN to use when performing key operations with this private key, or to null. Note that a copy is made of the PIN, which can be cleared out by calling destroy().
    • destroy

      public void destroy()
      Specified by:
      destroy in interface Destroyable
    • isDestroyed

      public boolean isDestroyed()
      Specified by:
      isDestroyed in interface Destroyable
    • getAlgorithm

      public String getAlgorithm()
      Specified by:
      getAlgorithm in interface Key
    • getFormat

      @Nullable public String getFormat()
      Specified by:
      getFormat in interface Key
    • getEncoded

      @Nullable public byte[] getEncoded()
      Specified by:
      getEncoded in interface Key