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, @Nullable PinPolicy pinPolicy, @Nullable TouchPolicy touchPolicy, char @Nullable [] pin) -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()byte @Nullable []@Nullable String@Nullable PinPolicyGet the PIN policy of the key, if available.getSlot()Get the PIV slot where the private key is stored.@Nullable TouchPolicyGet the Touch policy of the key, if available.booleanvoidsetPin(char @Nullable [] pin) Sets the PIN to use when performing key operations with this private key, or to null.
-
Field Details
-
pin
protected char @Nullable [] pin
-
-
Constructor Details
-
PivPrivateKey
protected PivPrivateKey(Slot slot, KeyType keyType, @Nullable PinPolicy pinPolicy, @Nullable TouchPolicy touchPolicy, char @Nullable [] 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(char @Nullable [] 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
public byte @Nullable [] getEncoded()- Specified by:
getEncodedin interfaceKey
-