Package com.yubico.yubikit.core.keys
Class PrivateKeyValues
java.lang.Object
com.yubico.yubikit.core.keys.PrivateKeyValues
- All Implemented Interfaces:
Destroyable
- Direct Known Subclasses:
PrivateKeyValues.Ec,PrivateKeyValues.Rsa
Contains private key values to be imported into a YubiKey.
Can be created from a PrivateKey by using fromPrivateKey(PrivateKey).
Once used, clear the secret keying material by calling destroy().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()static PrivateKeyValuesfromPrivateKey(PrivateKey privateKey) Constructs a PrivateKeyValues instance using values from a JCAPrivateKey.final intfinal boolean
-
Constructor Details
-
PrivateKeyValues
protected PrivateKeyValues(int bitLength)
-
-
Method Details
-
getBitLength
public final int getBitLength() -
isDestroyed
public final boolean isDestroyed()- Specified by:
isDestroyedin interfaceDestroyable
-
destroy
- Specified by:
destroyin interfaceDestroyable- Throws:
DestroyFailedException
-
fromPrivateKey
Constructs a PrivateKeyValues instance using values from a JCAPrivateKey.- Parameters:
privateKey- the private key to extract values from- Returns:
- private key values
-