Class ExternalPublicKey
java.lang.Object
org.bouncycastle.jcajce.ExternalPublicKey
- All Implemented Interfaces:
Serializable, AsymmetricKey, DEREncodablePREVIEW, Key, PublicKey
Wrapper class which returns an "ExternalValue" for the public key encoding. In this case
the key encoding is a hash and the actual key needs to be looked up somewhere else. Useful
for where the public keys are really large but it's required to keep certificates small.
- See Also:
-
Field Summary
Fields inherited from interface PublicKey
serialVersionUID -
Constructor Summary
ConstructorsConstructorDescriptionExternalPublicKey(PublicKey key, GeneralName location, MessageDigest digest) Helper constructor with JCA contents.ExternalPublicKey(ExternalValue extKey) Base constructor with ASN.1 structure.ExternalPublicKey(GeneralName location, AlgorithmIdentifier digestAlg, byte[] digest) Base constructor with fundamental contents. -
Method Summary
Modifier and TypeMethodDescriptionReturn "ExternalKey"byte[]Return a SubjectPublicKeyInfo structure containing an ExternalValue encoding for the key.Return "X.509" (DER encoded SubjectPublicKeyInfo)Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface AsymmetricKey
getParams
-
Constructor Details
-
ExternalPublicKey
Base constructor with fundamental contents.- Parameters:
location- location URI for the actual public key.digestAlg- hashing algorithm used to hash the actual public key encoding.digest- digest of the actual public key.
-
ExternalPublicKey
Helper constructor with JCA contents.- Parameters:
key- the public key we are externalising.location- location URI for the actual public key.digest- digest to use for hashing the key.
-
ExternalPublicKey
Base constructor with ASN.1 structure.- Parameters:
extKey- structure with location, hashing algorithm and hash for the public key.
-
-
Method Details
-
getAlgorithm
Return "ExternalKey"- Specified by:
getAlgorithmin interfaceKey- Returns:
- "ExternalKey"
-
getFormat
-
getEncoded
public byte[] getEncoded()Return a SubjectPublicKeyInfo structure containing an ExternalValue encoding for the key.- Specified by:
getEncodedin interfaceKey- Returns:
- a DER encoding of SubjectPublicKeyInfo containing an ExternalValue structure.
-