Package com.yubico.yubikit.core.keys
Class PublicKeyValues
java.lang.Object
com.yubico.yubikit.core.keys.PublicKeyValues
- Direct Known Subclasses:
PublicKeyValues.Cv25519
,PublicKeyValues.Ec
,PublicKeyValues.Rsa
Values defining a public key, such as an RSA or EC key.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
static class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PublicKeyValues
fromPublicKey
(PublicKey publicKey) final int
abstract byte[]
abstract PublicKey
Instantiates a JCA PublicKey using the contained parameters.
-
Field Details
-
bitLength
protected final int bitLength
-
-
Constructor Details
-
PublicKeyValues
protected PublicKeyValues(int bitLength)
-
-
Method Details
-
getBitLength
public final int getBitLength() -
getEncoded
public abstract byte[] getEncoded() -
toPublicKey
Instantiates a JCA PublicKey using the contained parameters.This requires a SecurityProvider capable of handling the key type.
- Returns:
- a public key, usable for cryptographic operations
- Throws:
NoSuchAlgorithmException
- if no Provider supports an implementation for the specified algorithm.InvalidKeySpecException
- if the given key specification is inappropriate for this key factory to produce a public key.
-
fromPublicKey
-