Class CompositePrivateKey
java.lang.Object
org.bouncycastle.jcajce.CompositePrivateKey
- All Implemented Interfaces:
Serializable, AsymmetricKey, DEREncodablePREVIEW, Key, PrivateKey, Destroyable
A composite private key class.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface PrivateKey
serialVersionUID -
Constructor Summary
ConstructorsConstructorDescriptionCompositePrivateKey(PrivateKey... keys) Create a composite private key from an array of PublicKeys.CompositePrivateKey(ASN1ObjectIdentifier algorithm, PrivateKey... keys) CompositePrivateKey(PrivateKeyInfo keyInfo) Create a composite private key from a PrivateKeyInfo.CompositePrivateKey(AlgorithmIdentifier algorithmIdentifier, PrivateKey... keys) Create a composite private key which corresponds to a composite signature algorithm in algorithmIdentifier. -
Method Summary
Modifier and TypeMethodDescriptionstatic CompositePrivateKey.Builderstatic CompositePrivateKey.Builderbuilder(ASN1ObjectIdentifier compAlgOid) booleanbyte[]Returns the encoding of the composite private key.Return a list of the component private keys making up this composite.Return a list of the providers supporting the component private keys.inthashCode()Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface AsymmetricKey
getParamsMethods inherited from interface Destroyable
destroy, isDestroyed
-
Constructor Details
-
CompositePrivateKey
Create a composite private key from an array of PublicKeys. This constructor is currently used only for legacy composites implementation.- Parameters:
keys- The component private keys.
-
CompositePrivateKey
-
CompositePrivateKey
Create a composite private key which corresponds to a composite signature algorithm in algorithmIdentifier. The component private 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-
-
CompositePrivateKey
Create a composite private key from a PrivateKeyInfo.- Parameters:
keyInfo- PrivateKeyInfo object containing a composite private key.
-
-
Method Details
-
builder
-
builder
-
getPrivateKeys
Return a list of the component private keys making up this composite.- Returns:
- an immutable list of private keys.
-
getProviders
-
getAlgorithm
- Specified by:
getAlgorithmin interfaceKey
-
getAlgorithmIdentifier
-
getFormat
-
getEncoded
public byte[] getEncoded()Returns the encoding of the composite private key. It is compliant with Composite ML-DSA for use in X.509 Public Key Infrastructure as each component is encoded as a PrivateKeyInfo (older name for OneAsymmetricKey).- Specified by:
getEncodedin interfaceKey- Returns:
-
hashCode
-
equals
-