public class JcaSignedPublicKeyAndChallenge extends SignedPublicKeyAndChallenge
PublicKeyAndChallenge ::= SEQUENCE {
spki SubjectPublicKeyInfo,
challenge IA5STRING
}
SignedPublicKeyAndChallenge ::= SEQUENCE {
publicKeyAndChallenge PublicKeyAndChallenge,
signatureAlgorithm AlgorithmIdentifier,
signature BIT STRING
}
spkacSeq| Constructor and Description |
|---|
JcaSignedPublicKeyAndChallenge(byte[] bytes)
Parse a SignedPublicKeyAndChallenge from its DER encoding.
|
| Modifier and Type | Method and Description |
|---|---|
java.security.PublicKey |
getPublicKey()
Return the public key carried by the SPKAC as a JCA
PublicKey, decoded via the
provider configured by setProvider(java.lang.String). |
JcaSignedPublicKeyAndChallenge |
setProvider(java.security.Provider provider)
Return a new holder that pins
KeyFactory lookups to the supplied JCE provider. |
JcaSignedPublicKeyAndChallenge |
setProvider(java.lang.String providerName)
Return a new holder that pins
KeyFactory lookups to the named JCE provider. |
getChallenge, getEncoded, getPublicKey, getPublicKeyAndChallenge, getSubjectPublicKeyInfo, isSignatureValid, toASN1Primitive, toASN1Structure, verify, verifypublic JcaSignedPublicKeyAndChallenge(byte[] bytes)
bytes - the encoded SPKAC bytes.public JcaSignedPublicKeyAndChallenge setProvider(java.lang.String providerName)
KeyFactory lookups to the named JCE provider.providerName - the name of the JCE provider to use.providerName.public JcaSignedPublicKeyAndChallenge setProvider(java.security.Provider provider)
KeyFactory lookups to the supplied JCE provider.provider - the JCE provider to use.provider.public java.security.PublicKey getPublicKey()
throws java.security.NoSuchAlgorithmException,
java.security.NoSuchProviderException,
java.security.InvalidKeyException
PublicKey, decoded via the
provider configured by setProvider(java.lang.String).java.security.NoSuchAlgorithmException - if no KeyFactory matches the SPKI algorithm.java.security.NoSuchProviderException - if the named provider is not registered.java.security.InvalidKeyException - if the SPKI cannot be decoded into a usable key.