Class CompositePublicKey
java.lang.Object
org.bouncycastle.jcajce.CompositePublicKey
- All Implemented Interfaces:
Serializable, AsymmetricKey, DEREncodablePREVIEW, Key, PublicKey
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface PublicKey
serialVersionUID -
Constructor Summary
ConstructorsConstructorDescriptionCompositePublicKey(PublicKey... keys) Create a composite public key from an array of PublicKeys.CompositePublicKey(ASN1ObjectIdentifier algorithmIdentifier, PublicKey... keys) CompositePublicKey(AlgorithmIdentifier algorithmIdentifier, PublicKey... keys) Create a composite public key which corresponds to a composite signature algorithm in algorithmIdentifier.CompositePublicKey(SubjectPublicKeyInfo keyInfo) Create a composite public key from a SubjectPublicKeyInfo. -
Method Summary
Modifier and TypeMethodDescriptionstatic CompositePublicKey.Builderstatic CompositePublicKey.Builderbuilder(ASN1ObjectIdentifier compAlgOid) booleanbyte[]Returns the composite public key encoded as a SubjectPublicKeyInfo.Return a list of the providers supporting the component private keys.Return a list of the component public keys making up this composite.inthashCode()Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface AsymmetricKey
getParams
-
Constructor Details
-
CompositePublicKey
Create a composite public key from an array of PublicKeys. This constructor is currently used only for legacy composites implementation.- Parameters:
keys- The component public keys.
-
CompositePublicKey
-
CompositePublicKey
Create a composite public key which corresponds to a composite signature algorithm in algorithmIdentifier. The component public keys are not checked if they satisfy the composite definition at this point, however, they will fail when they are fed into component algorithms which are defined by the algorithmIdentifier.- Parameters:
algorithmIdentifier-keys-
-
CompositePublicKey
Create a composite public key from a SubjectPublicKeyInfo.- Parameters:
keyInfo- SubjectPublicKeyInfo object containing a composite public key.
-
-
Method Details
-
builder
-
builder
-
getPublicKeys
-
getProviders
-
getAlgorithm
- Specified by:
getAlgorithmin interfaceKey
-
getAlgorithmIdentifier
-
getFormat
-
getEncoded
public byte[] getEncoded()Returns the composite public key encoded as a SubjectPublicKeyInfo. If the composite public key is legacy (MiscObjectIdentifiers.id_composite_key), it each component public key is wrapped in its own SubjectPublicKeyInfo. Other composite public keys are encoded according to Composite ML-DSA for use in X.509 Public Key Infrastructure where each component public key is a BIT STRING which contains the result of calling getEncoded() for each component public key.- Specified by:
getEncodedin interfaceKey- Returns:
-
hashCode
-
equals
-