public static class JcaMTCCosigner.Builder
extends java.lang.Object
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[], java.security.PrivateKey) time.
ECPrivateKey with a 256-bit order
→ ECDSA-P256-SHA256ECPrivateKey with 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 stringCallers who need to override the detected algorithm string can use the
explicit build(String, byte[], PrivateKey) overload.
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
JcaMTCCosigner |
build(byte[] cosignerId,
java.security.PrivateKey privateKey) |
JcaMTCCosigner |
build(java.lang.String algorithm,
byte[] cosignerId,
java.security.PrivateKey privateKey)
Explicit-algorithm overload for cases where the key-type detection in
build(byte[], PrivateKey) doesn't apply (e.g. a key whose
getAlgorithm() doesn't carry the MTC algorithm name). |
JcaMTCCosigner.Builder |
setProvider(java.security.Provider provider) |
JcaMTCCosigner.Builder |
setProvider(java.lang.String providerName) |
public JcaMTCCosigner.Builder setProvider(java.lang.String providerName)
public JcaMTCCosigner.Builder setProvider(java.security.Provider provider)
public JcaMTCCosigner build(byte[] cosignerId, java.security.PrivateKey privateKey)
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)java.lang.IllegalArgumentException - if the private key type is unsupportedpublic JcaMTCCosigner build(java.lang.String algorithm, byte[] cosignerId, java.security.PrivateKey privateKey)
build(byte[], PrivateKey) doesn't apply (e.g. a key whose
getAlgorithm() doesn't carry the MTC algorithm name).algorithm - one of the MTCSignatureAlgorithm constantscosignerId - 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 for algorithm