public abstract static class EntrustSigConfig.SingleAlgSigConfig extends EntrustSigConfig
This configuration identifies a single signature algorithm; the algorithm it identifies is not dependent on the strength of the key it is being used with. It contains all the information (signature algorithm identifier, signature algorithm parameters, and hash algorithm identifier) necessary to initialize a signature generation operation.
EntrustSigConfig.MultipleAlgSigConfig, EntrustSigConfig.SingleAlgSigConfigDSA_RECOMMENDED, DSA_SHA1, ECDSA_RECOMMENDED, ECDSA_RECOMMENDED_NO_SHA224, ECDSA_SHA1, ECDSA_SHA224, ECDSA_SHA256, ECDSA_SHA384, ECDSA_SHA512, RSA_RECOMMENDED, RSA_RECOMMENDED_NO_SHA224, RSA_SHA1, RSA_SHA224, RSA_SHA256, RSA_SHA384, RSA_SHA512, RSAPSS_RECOMMENDED, RSAPSS_RECOMMENDED_NO_SHA224, RSAPSS_SHA1, RSAPSS_SHA224, RSAPSS_SHA256, RSAPSS_SHA384, RSAPSS_SHA512| Modifier and Type | Method and Description |
|---|---|
ObjectID |
getHashAlgorithmOid()
Gets the hash algorithm object identifier associated with this
signature algorithm configuration.
|
AlgorithmID |
getSigAlgorithmId()
Gets the signature algorithm identifier associated with this
signature algorithm configuration.
|
ObjectID |
getSigAlgorithmOid()
Gets the signature algorithm object identifier associated with this
signature algorithm configuration.
|
java.security.spec.AlgorithmParameterSpec |
getSigAlgorithmParams()
Gets the signature algorithm parameters associated with this
signature algorithm configuration.
|
boolean |
isSupportedWithKey(java.security.Key key)
Indicates whether or not this signature algorithm configuration is
supported for use with the provided key.
|
EntrustSigConfig.SingleAlgSigConfig |
toSingleAlgSigConfig(EntrustAsymKeyType keyType)
Converts this signature algorithm configuration to a single algorithm
signature algorithm configuration based on the provided key type.
|
getInstance, getInstance, getListInstance, getName, getSigAlgConfig, getSigConfigString, isKeyTypeSupported, toStringpublic final ObjectID getSigAlgorithmOid()
public final java.security.spec.AlgorithmParameterSpec getSigAlgorithmParams()
Algorithm parameters are optional; some signature algorithm configurations will not contain algorithm parameters
null if
there are no algorithm parameterspublic final AlgorithmID getSigAlgorithmId()
The signature algorithm identifier is composed from the signature algorithm object identifier and signature algorithm parameters.
public final ObjectID getHashAlgorithmOid()
public final EntrustSigConfig.SingleAlgSigConfig toSingleAlgSigConfig(EntrustAsymKeyType keyType) throws java.security.KeyException
EntrustSigConfigThere are two main classes of signature algorithm configuration objects; 'single algorithm' and 'multiple algorithm'. A single algorithm configuration identifies a single algorithm and is not dependent on the strength of the key it is being used with. A multiple algorithm configuration identifies a set of algorithms and the actual algorithm to be used depends on the strength of the key being used.
In order to perform a signature operation using the algorithm identified by a signature algorithm configuration it must be first converted to a single algorithm configuration; this API performs that task. When called on a multiple algorithm configuration, the appropriate algorithm is selected from the set by examining the key strength. When called on a single algorithm configuration, the same single algorithm configuration is simply returned (essentially a no-op).
toSingleAlgSigConfig in class EntrustSigConfigkeyType - the key type of the key that will be used to perform the
signature operationjava.security.KeyException - if the key type is not supported by this signature algorithm
configuration (e.g. the key type is EC-based, but the
signature algorithm configuration is RSA-based)public boolean isSupportedWithKey(java.security.Key key)
For example, RSA-based signature algorithms are only supported for use with RSA keys; they are not supported for use with EC keys.
key - an asymmetric keytrue if this signature algorithm configuration
is supported for use with the provided key;
false otherwise