Class JcaMTCCosigner.Builder
java.lang.Object
org.bouncycastle.cert.plants.jcajce.JcaMTCCosigner.Builder
- Enclosing class:
JcaMTCCosigner
Builder for
JcaMTCCosigner. Selects the JCA provider used to obtain
the underlying Signature instance; the draft algorithm
identifier is detected from the private key type at build(byte[], PrivateKey) time.
ECPrivateKeywith a 256-bit order →ECDSA-P256-SHA256ECPrivateKeywith a 384-bit order →ECDSA-P384-SHA384getAlgorithm()equal to"Ed25519"or"EdDSA"→Ed25519getAlgorithm()equal to"ML-DSA-44"/"ML-DSA-65"/"ML-DSA-87"→ same string
Callers who need to override the detected algorithm string can use the
explicit build(String, byte[], PrivateKey) overload.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild(byte[] cosignerId, PrivateKey privateKey) build(String algorithm, byte[] cosignerId, PrivateKey privateKey) Explicit-algorithm overload for cases where the key-type detection inbuild(byte[], PrivateKey)doesn't apply (e.g. a key whosegetAlgorithm()doesn't carry the MTC algorithm name).setProvider(String providerName) setProvider(Provider provider)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setProvider
-
setProvider
-
build
- Parameters:
cosignerId- binary trust anchor ID of this cosigner — the CA's own trust anchor ID when the CA itself cosigns (Section 5.3); the cosigner's own trust anchor ID otherwiseprivateKey- JCA private key whose algorithm determines the MTC signature algorithm string (see class javadoc)- Throws:
IllegalArgumentException- if the private key type is unsupported
-
build
Explicit-algorithm overload for cases where the key-type detection inbuild(byte[], PrivateKey)doesn't apply (e.g. a key whosegetAlgorithm()doesn't carry the MTC algorithm name).- Parameters:
algorithm- one of theMTCSignatureAlgorithmconstantscosignerId- binary trust anchor ID of this cosigner — the CA's own trust anchor ID when the CA itself cosigns (Section 5.3); the cosigner's own trust anchor ID otherwiseprivateKey- JCA private key foralgorithm
-