Package com.yubico.yubikit.piv.jca
Class PivPrivateKey
java.lang.Object
com.yubico.yubikit.piv.jca.PivPrivateKey
- All Implemented Interfaces:
Serializable,Key,PrivateKey,Destroyable
- See Also:
-
Field Summary
FieldsFields inherited from interface java.security.PrivateKey
serialVersionUID -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPivPrivateKey(Slot slot, KeyType keyType, PinPolicy pinPolicy, TouchPolicy touchPolicy, char[] pin) -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()byte[]Get the PIN policy of the key, if available.getSlot()Get the PIV slot where the private key is stored.Get the Touch policy of the key, if available.booleanvoidsetPin(char[] pin) Sets the PIN to use when performing key operations with this private key, or to null.
-
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
Get the PIV slot where the private key is stored. -
getPinPolicy
Get the PIN policy of the key, if available. -
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 callingdestroy(). -
destroy
public void destroy()- Specified by:
destroyin interfaceDestroyable
-
isDestroyed
public boolean isDestroyed()- Specified by:
isDestroyedin interfaceDestroyable
-
getAlgorithm
- Specified by:
getAlgorithmin interfaceKey
-
getFormat
-
getEncoded
@Nullable public byte[] getEncoded()- Specified by:
getEncodedin interfaceKey
-