public class AlgorithmID extends java.lang.Object implements ASN1Type
An AlgorithmID object unequivocally identifies some specific algorithm by assigning a particular ObjectID to it. An algorithmID optionally may include algorithm parameters:
AlgorithmIdentifier ::= SEQUENCE {
algorithm OBJECT IDENTIFIER,
parameters ANY DEFINED BY algorithm OPTIONAL }
An AlgorithmID object may be, for instance, used for specifying the signature
algorithm when signing a X509Certificate, e,g.:
X509Certificate cert = new X509Certificate();
...
cert.sign(AlgorithmID.md5WithRSAEncryption, issuerPrivateKey);
This class statically registers AlgortihmIDs for several public key, key exchange, symmetric, signature and message digest algorithms. AlgorithmIDs that are already statically registered by this class easily may be obtained by only calling their corresponding parameter names, e.g.:
AlgorithmID algID = AlgorithmID.md5WithRSAEncryption;Attention This static registration part of this class only associates one specific object identifier with a particular AlgorithmID. If you intend to use another OID than the registered one, you should call the
AlgorithmID(String objectID, String
name, String implementation) constructor for registering the OID as
alternative OID for the specific algorithm, where objectID indicates
the OID in mind, name specifies a name for the OID, and
implementationName a string constant to be used for querying for an
implementation of the algorithm. This constant may be the specific
algorithm's standard name, a registered algorithm alias (but
preferably not an OID alias!) (see IAIK
provider), or a proper "transformation string" (e.g. "DES/CBC/PKCS5Padding")
when dealing with a Cipher algorithm. After registration has been performed,
the getSignatureInstance(),
getMessageDigestInstance(),
getCipherInstance(),
getKeyAgreementInstance(), or the getInstance() method may be used to search for an
implementation of the corresponding algorithm, whereas
getInstance() steps through all the other algorithm types,
e.g.:
AlgorithmID algID = AlgorithmID.dsa;Signature dsa = algID.getSignatureInstance(); //or: Signature dsa = (Signature)algID.getInstance();Unfortunately sometimes there exist multiple object identifiers associated with the same algorithm. Where recognized, the
IAIKprovider) registers such object
identifiers as aliases for the specific algorithm. Consider, for instance,
the two OID strings "1.3.14.3.2.29" and "1.2.840.113549.1.1.5", both
identifying the "sha1WithRSAEncryption" signature algorithm. Both OID strings
are registered by the IAIK provider as aliases for the "SHA/RSA" algorithm.
However the sha1WithRSAEncryption parameter of
this class only associates the "1.3.14.3.2.29" object identifier with the
"SHA/RSA" algorithm by statically calling
public static AlgorithmID sha1WithRSAEncryption = new AlgorithmID(
"1.3.14.3.2.29", "sha1WithRSAEncryption", "SHA/RSA");
Now, if you prefer to use "1.2.840.113549.1.1.5" instead of "1.3.14.3.2.29"
you additionally may register this OID by calling:
AlgorithmID algID = new AlgorithmID("1.2.840.113549.1.1.5",
"sha1WithRSAEncryption", "SHA/RSA");
Notice, that this will not discard the predefined
AlgorithmID.sha1WithRSAEncryption. Accessing
AlgorithmID.sha1WithRSAEncryption, again will show 1.3.14.3.2.29. However,
you may access your new algorithmID with variable algID you have just
created, and when parsing an algorithmID both OIDs will be recognized and
handeld properly. Note that proper parsing for "SHA/RSA" with
"1.2.840.113549.1.1.5" already is ensured by alias registration in the IAIK
provider. However you may wish to create a new "SHA/RSA" AlgorithmID
for "1.2.840.113549.1.1.5", or you may know of a object ID which already is
not registered as alias). Or you may deal with a cipher where alias
registration may not satisfy since padding scheme and cipher mode maybe
required. The, for instance, des_CBCcipher algorithmID
statically is registered by using the "DES/CBC/PKCS5Padding" transformation
string as implementation name:
public static AlgorithmID des_CBC = new AlgorithmID("1.3.14.3.2.7", "DES-CBC",
"DES/CBC/PKCS5Padding");
For defining AlgorithmIDs for algorithms not implemented by the IAIK
provider, this class uses the AlgorithmID(String objectID, String name) constructor.
If you want to change the object identifier of an already existing
AlgorithmID permanently, you may use the
changeObjectID(AlgorithmID
algID, ObjectID oid) or changeOIDString(AlgorithmID algID, String oidString) method; the latter
adopts any existing name or shortName from the old oid. With JDK 1.2 the SUN
provider, for instance, has changed the algorithm oid of the DSA algorithm
from 1.3.14.3.2.12 to 1.2.840.10040.4.1, whereas IAIK continues to use
1.3.14.3.2.12. An application wishing to use the new OID may allocate it by:
AlgorithmID.changeOIDString(AlgorithmID.dsa, "1.2.840.10040.4.1");or
ObjectID oid = new ObjectID("1.2.840.10040.4.1", "DSA", "DSA");
AlgorithmID.changeObjectID(AlgorithmID.dsa, oid);
Attention You should clonean algorithmID before
adding parameters to avoid unintentional parameter allocation!ASN1Type,
ASN1Object,
ObjectID| Modifier and Type | Field and Description |
|---|---|
static AlgorithmID |
aes_128_CBC
Creates an AlgorithmID for the
AES symmetric block cipher
used with a 128-bit key in CBC mode. |
static AlgorithmID |
aes_128_ECB
Creates an AlgorithmID for the
AES symmetric block cipher
used with a 128-bit key in ECB mode. |
static AlgorithmID |
aes_128_wrap
Creates an AlgorithmID for the
AesKeyWrap key wrap
algorithm for wrapping 128-bit AES content encryption keys with
128-bit AES key encryption keys (RFC 3394). |
static AlgorithmID |
aes_192_CBC
Creates an AlgorithmID for the
AES symmetric block cipher
used with a 192-bit key in CBC mode. |
static AlgorithmID |
aes_192_ECB
Creates an AlgorithmID for the
AES symmetric block cipher
used with a 192-bit key in ECB mode. |
static AlgorithmID |
aes_192_wrap
Creates an AlgorithmID for the
AesKeyWrap key wrap
algorithm for wrapping 192-bit AES content encryption keys with
192-bit AES key encryption keys (RFC 3394). |
static AlgorithmID |
aes_256_CBC
Creates an AlgorithmID for the
AES symmetric block cipher
used with a 256-bit key in CBC mode. |
static AlgorithmID |
aes_256_ECB
Creates an AlgorithmID for the
AES symmetric block cipher
used with a 256-bit key in ECB mode. |
static AlgorithmID |
aes_256_wrap
Creates an AlgorithmID for the
AesKeyWrap key wrap
algorithm for wrapping 256-bit AES content encryption keys with
256-bit AES key encryption keys (RFC 3394). |
static AlgorithmID |
cast3_CBC
Creates an AlgorithmID for the
CAST3 symmetric block
cipher used in CBC mode. |
static AlgorithmID |
cast5_CBC
Creates an AlgorithmID for the
CAST5 symmetric block
cipher used in CBC mode. |
static AlgorithmID |
cms_3DES_wrap
Creates an AlgorithmID for the
CMS3DESwrap key wrap
algorithm for wrapping DESede content encryption keys with DESede key
encryption keys (RFC 2630). |
static AlgorithmID |
cms_cast_wrap
Creates an AlgorithmID for the
CMSCAST128wrap key wrap
algorithm for wrapping CAST128 content encryption keys with CAST128 key
encryption keys (RFC 2984). |
static AlgorithmID |
cms_cast5_wrap
Creates an AlgorithmID for the
CMSCAST128wrap key wrap
algorithm for wrapping CAST128 content encryption keys with CAST128 key
encryption keys (RFC 2984). |
static AlgorithmID |
cms_idea_wrap
Creates an AlgorithmID for the
CMSIDEAwrap key wrap
algorithm for wrapping IDEA content encryption keys with IDEA key
encryption keys (RFC 3058). |
static AlgorithmID |
cms_pwri_kek
Creates an AlgorithmID for the
key wrap
algorithm for wrapping a Password Recipient Info content encryption key
a Key Encryption Key derived from a password (RFC 3231). |
static AlgorithmID |
cms_rc2_wrap
Creates an AlgorithmID for the
CMSRC2wrap key wrap
algorithm for wrapping RC2 content encryption keys with RC2 key
encryption keys (RFC 2630). |
static AlgorithmID |
des_CBC
Creates an AlgorithmID for the
DES symmetric block cipher
used in CBC mode. |
static AlgorithmID |
des_EDE3_CBC
Creates an AlgorithmID for the
Triple DES symmetric block
cipher used in CBC mode. |
static AlgorithmID |
dhKeyAgreement
Creates an AlgorithmID for the
Diffie-Hellman key exchange
algorithm. |
static AlgorithmID |
dhSinglePass_cofactorDH_sha1kdf_scheme
Creates an AlgorithmID for the
1-Pass Diffie Hellman scheme
that uses the modified (aka: cofactor) Diffie-Hellman primitive and the
key derivation function based on SHA-1 (ANSI X9.63). |
static AlgorithmID |
dhSinglePass_cofactorDH_sha224kdf_scheme
To support some new KARI Algorithms for ECC CMC RFC#5753
|
static AlgorithmID |
dhSinglePass_cofactorDH_sha256kdf_scheme |
static AlgorithmID |
dhSinglePass_cofactorDH_sha384kdf_scheme |
static AlgorithmID |
dhSinglePass_cofactorDH_sha512kdf_scheme |
static AlgorithmID |
dhSinglePass_stdDH_sha1kdf_scheme
Creates an AlgorithmID for the
1-Pass Diffie Hellman
scheme that uses the standard Diffie-Hellman primitive and the key
derivation function based on SHA-1 (ANSI X9.63). |
static AlgorithmID |
dhSinglePass_stdDH_sha224kdf_scheme |
static AlgorithmID |
dhSinglePass_stdDH_sha256kdf_scheme
To support some new KARI Algorithms for ECC CMC RFC#5753
|
static AlgorithmID |
dhSinglePass_stdDH_sha384kdf_scheme |
static AlgorithmID |
dhSinglePass_stdDH_sha512kdf_scheme |
static AlgorithmID |
dsa
Creates an AlgorithmID for the
DSA signature algorithm. |
static AlgorithmID |
dsa_With_SHA1
Creates an alternative AlgorithmID for the
dsaWithSHA1
signature algorithm. |
static AlgorithmID |
dsaWithSHA
Creates an AlgorithmID for the
dsaWithSHA signature
algorithm. |
static AlgorithmID |
dsaWithSHA1
Creates an AlgorithmID for the
dsaWithSHA1 signature
algorithm. |
static AlgorithmID |
dsaX957
Creates an AlgorithmID for the
DSA signature algorithm,
using the OID defined in the X.957 standard. |
static AlgorithmID |
ecdsa_with_Recommended
Creates an AlgorithmID for the
ecdsa-with-Recommended signature algorithm. |
static AlgorithmID |
ecdsa_with_Sha224
Creates an AlgorithmID for the
ecdsa-with-Sha224 signature algorithm. |
static AlgorithmID |
ecdsa_with_Sha256
Creates an AlgorithmID for the
ecdsa-with-Sha256 signature algorithm. |
static AlgorithmID |
ecdsa_with_Sha384
Creates an AlgorithmID for the
ecdsa-with-Sha384 signature algorithm. |
static AlgorithmID |
ecdsa_with_Sha512
Creates an AlgorithmID for the
ecdsa-with-Sha512 signature algorithm. |
static AlgorithmID |
ecdsa_with_Specified
Creates an AlgorithmID for the
ecdsa-with-Specified signature algorithm. |
static AlgorithmID |
ecdsaWithSHA1
Creates an AlgorithmID for the
ecdsaWithSHA1 signature algorithm. |
static AlgorithmID |
esdh
Creates an AlgorithmID for identifying public
Ephemeral-Static
Diffie-Hellman
keys. |
static AlgorithmID |
esdhKeyAgreement
Creates an AlgorithmID for the
Ephemeral-Static Diffie-Hellman key agreement algorithm
(RFC 2631). |
static AlgorithmID |
id_ecPublicKey
Creates an AlgorithmID that represents an
EC
public key (ANSI X9.62). |
static AlgorithmID |
id_RSASAA_PSS
An AlgorithmID for the RSA-PSS signature algorithm.
|
static AlgorithmID |
idea_CBC
Creates an AlgorithmID for the
IDEA symmetric block cipher
used in CBC mode. |
protected static java.util.Hashtable |
implementations
Implementation repository.
|
static AlgorithmID |
md2
Creates an AlgorithmID for the
MD2 message digest
algorithm. |
static AlgorithmID |
md2WithRSAEncryption
Creates an AlgorithmID for the
md2WithRSAEncryption
signature algorithm. |
static AlgorithmID |
md4
Creates an AlgorithmID for the
MD4 message digest
algorithm. |
static AlgorithmID |
md4WithRSAEncryption
Creates an AlgorithmID for the
md4WithRSAEncryption
signature algorithm. |
static AlgorithmID |
md5
Creates an AlgorithmID for the
MD5 message digest
algorithm. |
static AlgorithmID |
md5WithRSAEncryption
Creates an AlgorithmID for the
md5WithRSAEncryption
signature algorithm. |
static AlgorithmID |
mgf1
Creates an AlgorithmID for the
MGF1 mask generation
algorithm used in PKCS-1 v2.0. |
static AlgorithmID |
pbeWithMD5AndDES_CBC
Creates an AlgorithmID for the
pbeWithMD5AndDES_CBC
key-encryption algorithm as defined by PKCS#5. |
static AlgorithmID |
pbeWithSHAAnd128BitRC2_CBC
Creates an AlgorithmID for the
pbeWithSHAAnd128BitRC2_CBC
key-encryption algorithm as defined by PKCS#12. |
static AlgorithmID |
pbeWithSHAAnd128BitRC4
Creates an AlgorithmID for the
pbeWithSHAAnd128BitRC4
key-encryption algorithm as defined by PKCS#12. |
static AlgorithmID |
pbeWithSHAAnd2_KeyTripleDES_CBC
Creates an AlgorithmID for the
pbeWithSHAAnd2_KeyTripleDES_CBC key-encryption algorithm
as defined by PKCS#12. |
static AlgorithmID |
pbeWithSHAAnd3_KeyTripleDES_CBC
Creates an AlgorithmID for the
pbeWithSHAAnd3_KeyTripleDES_CBC key-encryption algorithm
as defined by PKCS#12. |
static AlgorithmID |
pbeWithSHAAnd40BitRC2_CBC
Creates an AlgorithmID for the
pbeWithSHAAnd40BitRC2_CBC
key-encryption algorithm as defined by PKCS#12. |
static AlgorithmID |
pbeWithSHAAnd40BitRC4
Creates an AlgorithmID for the
pbeWithSHAAnd40BitRC4
key-encryption algorithm as defined by PKCS#12. |
static AlgorithmID |
pbkdf2
Creates an AlgorithmID for the
PBKDF2
key-generator algorithm as defined by RFC 2298. |
static AlgorithmID |
rc2_CBC
Creates an AlgorithmID for the
RC2 symmetric block cipher
used in CBC mode. |
static AlgorithmID |
rc4
Creates an AlgorithmID for the
RC4 stream cipher. |
static AlgorithmID |
rc5_CBC
Creates an AlgorithmID for the
RC5 symmetric block cipher
used in CBC mode. |
static AlgorithmID |
rsa
Creates an AlgorithmID for the
RSA public key algorithm. |
static AlgorithmID |
rsaEncryption
Creates an AlgorithmID for the
RSA encryption signature
algorithm. |
static AlgorithmID |
rsaESOAEP
Creates an AlgorithmID for the
RSA encryption signature
algorithm, using the OAEP encoding scheme defined in PKCS-1 v2.0
ObjectID = "1.2.840.113549.1.1.7"
name = "rsaESOAEP"
implementationName = "RSA-OAEP"
For addressing it, use AlgorithmID.rsaESOAEP. |
static AlgorithmID |
sha
Creates an AlgorithmID for the
SHA message digest
algorithm. |
static AlgorithmID |
sha1
Creates an AlgorithmID for the
SHA1 message digest
algorithm which is the same as SHA. |
static AlgorithmID |
sha1WithRSAEncryption
Creates an AlgorithmID for the
sha1WithRSAEncryption
signature algorithm. |
static AlgorithmID |
sha224
Creates an AlgorithmID for the
SHA224 message digest
algorithm. |
static AlgorithmID |
sha224WithRSAEncryption
Creates an AlgorithmID for the
sha224WithRSAEncryption
signature algorithm. |
static AlgorithmID |
sha256
Creates an AlgorithmID for the
SHA256 message digest
algorithm. |
static AlgorithmID |
sha256WithRSAEncryption
Creates an AlgorithmID for the
sha256WithRSAEncryption
signature algorithm. |
static AlgorithmID |
sha384
Creates an AlgorithmID for the
SHA384 message digest
algorithm. |
static AlgorithmID |
sha384WithRSAEncryption
Creates an AlgorithmID for the
sha384WithRSAEncryption
signature algorithm. |
static AlgorithmID |
sha512
Creates an AlgorithmID for the
SHA512 message digest
algorithm. |
static AlgorithmID |
sha512WithRSAEncryption
Creates an AlgorithmID for the
sha512WithRSAEncryption
signature algorithm. |
| Constructor and Description |
|---|
AlgorithmID()
Default constructor.
|
AlgorithmID(ASN1Object algorithmID)
Creates a new AlgorithmID from an ASN1Object.
|
AlgorithmID(DerInputStream is)
Decodes an AlgorithmID from a DerInputStream.
|
AlgorithmID(ObjectID algorithm)
Creates a new AlgorithmID from an ObjectID.
|
AlgorithmID(ObjectID algorithm,
ASN1Object parameter)
Creates a new AlgorithmID from an ObjectID and algorithm parameters.
|
AlgorithmID(ObjectID algorithm,
java.lang.String implementationName)
Creates a new AlgorithmID from an ObjectID and an implementation.
|
AlgorithmID(java.lang.String objectID,
java.lang.String name)
Creates a new AlgorithmID from an object identifier and a name.
|
AlgorithmID(java.lang.String objectID,
java.lang.String name,
java.lang.String implementationName)
Creates a new AlgorithmID from an object identifier, a name and an
implementation.
|
| Modifier and Type | Method and Description |
|---|---|
static boolean |
changeObjectID(AlgorithmID algID,
ObjectID oid)
Changes the object identifier of the given AlgorithmID object.
|
static boolean |
changeOIDString(AlgorithmID algID,
java.lang.String oidString)
Changes the object identifier string of the given AlgorithmID object.
|
java.lang.Object |
clone()
Returns a clone of this AlgorithmID.
|
void |
decode(ASN1Object algorithmID)
Decodes an AlgorithmID from the given ASN1Object.
|
void |
encodeAbsentParametersAsNull(boolean useNULLForAbsentParameters)
Decide whether to encode absent parameters as NULL or omit the parameters
field.
|
boolean |
equals(java.lang.Object obj)
Compares this AlgorithmID with the given AlgorithmID.
|
ObjectID |
getAlgorithm()
Returns the ObjectID of the algorithm.
|
java.security.AlgorithmParameters |
getAlgorithmParameters()
Returns the parameters of the algorithm as
java.security.AlgorithmParameters object. |
java.security.AlgorithmParameters |
getAlgorithmParameters(java.lang.String algorithm)
Returns the parameters of the algorithm as
java.security.AlgorithmParameters object. |
java.security.AlgorithmParameters |
getAlgorithmParameters(java.lang.String algorithm,
java.lang.String provider)
Returns the parameters of the algorithm as
java.security.AlgorithmParameters object. |
javax.crypto.Cipher |
getCipherInstance()
Tries to find a Cipher implementation for this AlgorithmIdentifier.
|
javax.crypto.Cipher |
getCipherInstance(java.lang.String provider)
Tries to find a provider-specific Cipher implementation for this
AlgorithmIdentifier.
|
boolean |
getDecodedAbsentParameters()
This method is used to determine if the ASN1 Encoded version
of the parameters were absent when this structure was decoded.
|
java.lang.String |
getImplementationName()
Returns the name for an implementation of this algorithm.
|
java.lang.Object |
getInstance()
Tries to find an implementation for this AlgorithmIdentifier.
|
java.lang.Object |
getInstance(java.lang.String provider)
Tries to find a provider specific implementation for this
AlgorithmIdentifier.
|
javax.crypto.KeyAgreement |
getKeyAgreementInstance()
Tries to find a KeyAgreement implementation for this AlgorithmIdentifier.
|
javax.crypto.KeyAgreement |
getKeyAgreementInstance(java.lang.String provider)
Tries to find a provider-specific KeyAgreement implementation for this
AlgorithmIdentifier.
|
java.security.KeyFactory |
getKeyFactoryInstance()
Tries to find a KeyFactory implementation for this AlgorithmIdentifier.
|
java.security.KeyFactory |
getKeyFactoryInstance(java.lang.String provider)
Tries to find a provider-specific KeyFactory implementation for this
AlgorithmIdentifier.
|
javax.crypto.KeyGenerator |
getKeyGeneratorInstance()
Tries to find a KeyGenerator implementation for this AlgorithmIdentifier.
|
javax.crypto.KeyGenerator |
getKeyGeneratorInstance(java.lang.String provider)
Tries to find a provider-specific KeyGenerator implementation for this
AlgorithmID.
|
java.security.KeyPairGenerator |
getKeyPairGeneratorInstance()
Tries to find a KeyPairGenerator implementation for this
AlgorithmIdentifier.
|
java.security.KeyPairGenerator |
getKeyPairGeneratorInstance(java.lang.String provider)
Tries to find a provider-specific KeyPairGenerator implementation for
this AlgorithmID.
|
java.security.MessageDigest |
getMessageDigestInstance()
Tries to find a
MessageDigest implementation for this
AlgorithmIdentifier. |
java.security.MessageDigest |
getMessageDigestInstance(java.lang.String provider)
Tries to find a
MessageDigest implementation for this
AlgorithmIdentifier. |
java.lang.String |
getName()
Returns the name registered for this AlgorithmID or the object identifier
string if there is no name registered.
|
ASN1Object |
getParameter()
Returns the parameters of the algorithm as ASN1Object.
|
java.lang.String |
getRawImplementationName()
Tries to get the raw inplementation name of the algorithm this
AlgorithmID represents.
|
javax.crypto.SecretKeyFactory |
getSecretKeyFactoryInstance()
Tries to find a SecretKeyFactory implementation for this
AlgorithmIdentifier.
|
javax.crypto.SecretKeyFactory |
getSecretKeyFactoryInstance(java.lang.String provider)
Tries to find a provider-specific SecretKeyFactory implementation for
this AlgorithmID.
|
java.security.Signature |
getSignatureInstance()
Tries to find a Signature implementation for this AlgorithmIdentifier.
|
java.security.Signature |
getSignatureInstance(java.lang.String provider)
Tries to find a provider-specific Signature implementation for this
AlgorithmIdentifier.
|
void |
initSignatureSign(java.security.Signature signatureAlg,
java.security.PrivateKey signingKey)
Initializes a
Signature algorithm instance for
signing with the specified signing private key and algorithm
parameters from the Algorithm Identifier. |
void |
initSignatureVerify(java.security.Signature signatureAlg,
java.security.PublicKey verificationKey)
Initializes a
Signature algorithm instance for
verification with the specified verification public key and algorithm
parameters from the Algorithm Identifier. |
void |
setAlgorithmParameters(java.security.AlgorithmParameters parameters)
Sets the parameters of the algorithm.
|
void |
setParameter(ASN1Object parameters)
Sets the parameters of the algorithm.
|
ASN1Object |
toASN1Object()
Returns the AlgorithmID as an (SEQUENCE) ASN1Object.
|
ASN1Object |
toASN1Object(boolean useNULLForAbsentParameters)
Returns the AlgorithmID as an (SEQUENCE) ASN1Object.
|
AlgorithmID |
toEntrustAlgorithmID()
Converts an IAIK Algorithm Identifier to an Entrust Algorithm Identifier.
|
java.lang.String |
toString()
Returns a string that represents this AlgorithmIdentifier.
|
protected static java.util.Hashtable implementations
public static AlgorithmID dhKeyAgreement
Diffie-Hellman key exchange
algorithm.
AlgorithmID.dhKeyAgreement.public static AlgorithmID esdhKeyAgreement
Ephemeral-Static Diffie-Hellman key agreement algorithm
(RFC 2631).
AlgorithmID.esdhKeyAgreement.public static AlgorithmID esdh
Ephemeral-Static
Diffie-Hellman
keys.
AlgorithmID.esdh.public static AlgorithmID rsaEncryption
RSA encryption signature
algorithm.
AlgorithmID.rsaEncryption.public static AlgorithmID rsaESOAEP
RSA encryption signature
algorithm, using the OAEP encoding scheme defined in PKCS-1 v2.0
AlgorithmID.rsaESOAEP.public static AlgorithmID mgf1
MGF1 mask generation
algorithm used in PKCS-1 v2.0.
AlgorithmID.mgf1.public static AlgorithmID md2WithRSAEncryption
md2WithRSAEncryption
signature algorithm.
AlgorithmID.md2WithRSAEncryption.public static AlgorithmID md4WithRSAEncryption
md4WithRSAEncryption
signature algorithm.
AlgorithmID.md4WithRSAEncryption.public static AlgorithmID md5WithRSAEncryption
md5WithRSAEncryption
signature algorithm.
AlgorithmID.md5WithRSAEncryption.public static AlgorithmID sha1WithRSAEncryption
sha1WithRSAEncryption
signature algorithm.
AlgorithmID.sha1WithRSAEncryption.public static AlgorithmID sha512WithRSAEncryption
sha512WithRSAEncryption
signature algorithm.
AlgorithmID.sha512WithRSAEncryption.public static AlgorithmID sha384WithRSAEncryption
sha384WithRSAEncryption
signature algorithm.
AlgorithmID.sha384WithRSAEncryption.public static AlgorithmID sha256WithRSAEncryption
sha256WithRSAEncryption
signature algorithm.
AlgorithmID.sha256WithRSAEncryption.public static AlgorithmID sha224WithRSAEncryption
sha224WithRSAEncryption
signature algorithm.
AlgorithmID.sha224WithRSAEncryption.public static AlgorithmID dsa
DSA signature algorithm.
AlgorithmID.dsa.public static AlgorithmID dsaX957
DSA signature algorithm,
using the OID defined in the X.957 standard.
AlgorithmID.dsaX957.public static AlgorithmID dsaWithSHA
dsaWithSHA signature
algorithm.
AlgorithmID.dsaWithSHA.public static AlgorithmID dsaWithSHA1
dsaWithSHA1 signature
algorithm.
AlgorithmID.dsaWithSHA1.public static AlgorithmID dsa_With_SHA1
dsaWithSHA1
signature algorithm.
AlgorithmID.dsa_With_SHA1.public static AlgorithmID ecdsaWithSHA1
ecdsaWithSHA1 signature algorithm.
AlgorithmID.ecdsaWithSHA1.public static AlgorithmID ecdsa_with_Recommended
ecdsa-with-Recommended signature algorithm.
AlgorithmID.ecdsaWithRecommended.public static AlgorithmID ecdsa_with_Specified
ecdsa-with-Specified signature algorithm.
AlgorithmID.ecdsaWithSpecified.public static AlgorithmID ecdsa_with_Sha224
ecdsa-with-Sha224 signature algorithm.
AlgorithmID.ecdsaWithSHA224.public static AlgorithmID ecdsa_with_Sha256
ecdsa-with-Sha256 signature algorithm.
AlgorithmID.ecdsaWithSHA256.public static AlgorithmID ecdsa_with_Sha384
ecdsa-with-Sha384 signature algorithm.
AlgorithmID.ecdsaWithSHA384.public static AlgorithmID ecdsa_with_Sha512
ecdsa-with-Sha512 signature algorithm.
AlgorithmID.ecdsaWithSHA512.public static AlgorithmID pbeWithMD5AndDES_CBC
pbeWithMD5AndDES_CBC
key-encryption algorithm as defined by PKCS#5.
AlgorithmID.pbeWithMD5AndDES_CBC.public static AlgorithmID pbkdf2
PBKDF2
key-generator algorithm as defined by RFC 2298.
AlgorithmID.pbkdf2.public static AlgorithmID pbeWithSHAAnd128BitRC4
pbeWithSHAAnd128BitRC4
key-encryption algorithm as defined by PKCS#12.
AlgorithmID.pbeWithSHAAnd128BitRC4.public static AlgorithmID pbeWithSHAAnd40BitRC4
pbeWithSHAAnd40BitRC4
key-encryption algorithm as defined by PKCS#12.
AlgorithmID.pbeWithSHAAnd40BitRC4.public static AlgorithmID pbeWithSHAAnd3_KeyTripleDES_CBC
pbeWithSHAAnd3_KeyTripleDES_CBC key-encryption algorithm
as defined by PKCS#12.
AlgorithmID.pbeWithSHAAnd3_KeyTripleDES_CBC.public static AlgorithmID pbeWithSHAAnd2_KeyTripleDES_CBC
pbeWithSHAAnd2_KeyTripleDES_CBC key-encryption algorithm
as defined by PKCS#12.
AlgorithmID.pbeWithSHAAnd2_KeyTripleDES_CBC.public static AlgorithmID pbeWithSHAAnd128BitRC2_CBC
pbeWithSHAAnd128BitRC2_CBC
key-encryption algorithm as defined by PKCS#12.
AlgorithmID.pbeWithSHAAnd128BitRC2_CBC.public static AlgorithmID pbeWithSHAAnd40BitRC2_CBC
pbeWithSHAAnd40BitRC2_CBC
key-encryption algorithm as defined by PKCS#12.
AlgorithmID.pbeWithSHAAnd40BitRC2_CBC.public static AlgorithmID rsa
RSA public key algorithm.
AlgorithmID.rsa.public static AlgorithmID rc2_CBC
RC2 symmetric block cipher
used in CBC mode.
AlgorithmID.rc2_CBC.public static AlgorithmID rc4
RC4 stream cipher.
AlgorithmID.rc4.public static AlgorithmID des_EDE3_CBC
Triple DES symmetric block
cipher used in CBC mode.
AlgorithmID.des_EDE3_CBC.public static AlgorithmID des_CBC
DES symmetric block cipher
used in CBC mode.
AlgorithmID.des_CBC.public static AlgorithmID idea_CBC
IDEA symmetric block cipher
used in CBC mode.
AlgorithmID.idea_CBC.public static AlgorithmID cast5_CBC
CAST5 symmetric block
cipher used in CBC mode.
AlgorithmID.cast5_CBC.public static AlgorithmID cast3_CBC
CAST3 symmetric block
cipher used in CBC mode.
AlgorithmID.cast3_CBC.public static AlgorithmID rc5_CBC
RC5 symmetric block cipher
used in CBC mode.
AlgorithmID.rc5_CBC.public static AlgorithmID aes_128_ECB
AES symmetric block cipher
used with a 128-bit key in ECB mode.
AlgorithmID.aes_128_ECB.public static AlgorithmID aes_128_CBC
AES symmetric block cipher
used with a 128-bit key in CBC mode.
AlgorithmID.aes_128_CBC.public static AlgorithmID aes_192_ECB
AES symmetric block cipher
used with a 192-bit key in ECB mode.
AlgorithmID.aes_192_ECB.public static AlgorithmID aes_192_CBC
AES symmetric block cipher
used with a 192-bit key in CBC mode.
AlgorithmID.aes_192_CBC.public static AlgorithmID aes_256_ECB
AES symmetric block cipher
used with a 256-bit key in ECB mode.
AlgorithmID.aes_256_ECB.public static AlgorithmID aes_256_CBC
AES symmetric block cipher
used with a 256-bit key in CBC mode.
AlgorithmID.aes_256_CBC.public static AlgorithmID md2
MD2 message digest
algorithm.
AlgorithmID.md2.public static AlgorithmID md4
MD4 message digest
algorithm.
AlgorithmID.md4.public static AlgorithmID md5
MD5 message digest
algorithm.
AlgorithmID.md5.public static AlgorithmID sha
SHA message digest
algorithm.
AlgorithmID.sha.public static AlgorithmID sha1
SHA1 message digest
algorithm which is the same as SHA.
AlgorithmID.sha1.public static AlgorithmID sha224
SHA224 message digest
algorithm.
AlgorithmID.sha224.public static AlgorithmID sha256
SHA256 message digest
algorithm.
AlgorithmID.sha256.public static AlgorithmID sha384
SHA384 message digest
algorithm.
AlgorithmID.sha384.public static AlgorithmID sha512
SHA512 message digest
algorithm.
AlgorithmID.sha512.public static AlgorithmID cms_3DES_wrap
CMS3DESwrap key wrap
algorithm for wrapping DESede content encryption keys with DESede key
encryption keys (RFC 2630).
AlgorithmID.cms_3DES_wrap.public static AlgorithmID cms_rc2_wrap
CMSRC2wrap key wrap
algorithm for wrapping RC2 content encryption keys with RC2 key
encryption keys (RFC 2630).
AlgorithmID.cms_rc2_wrap.public static AlgorithmID cms_pwri_kek
key wrap
algorithm for wrapping a Password Recipient Info content encryption key
a Key Encryption Key derived from a password (RFC 3231).
AlgorithmID.cms_pwri_kek.public static AlgorithmID cms_idea_wrap
CMSIDEAwrap key wrap
algorithm for wrapping IDEA content encryption keys with IDEA key
encryption keys (RFC 3058).
AlgorithmID.cms_idea_wrap.public static AlgorithmID cms_cast5_wrap
CMSCAST128wrap key wrap
algorithm for wrapping CAST128 content encryption keys with CAST128 key
encryption keys (RFC 2984).
AlgorithmID.cms_cast5_wrap.public static AlgorithmID cms_cast_wrap
CMSCAST128wrap key wrap
algorithm for wrapping CAST128 content encryption keys with CAST128 key
encryption keys (RFC 2984).
AlgorithmID.cms_cast_wrap.public static AlgorithmID id_ecPublicKey
EC
public key (ANSI X9.62).
AlgorithmID.id_ecPublicKey.public static AlgorithmID dhSinglePass_stdDH_sha1kdf_scheme
1-Pass Diffie Hellman
scheme that uses the standard Diffie-Hellman primitive and the key
derivation function based on SHA-1 (ANSI X9.63).
AlgorithmID.dhSinglePass_stdDH_sha1kdf_scheme.public static AlgorithmID dhSinglePass_stdDH_sha256kdf_scheme
public static AlgorithmID dhSinglePass_stdDH_sha224kdf_scheme
public static AlgorithmID dhSinglePass_stdDH_sha384kdf_scheme
public static AlgorithmID dhSinglePass_stdDH_sha512kdf_scheme
public static AlgorithmID dhSinglePass_cofactorDH_sha1kdf_scheme
1-Pass Diffie Hellman scheme
that uses the modified (aka: cofactor) Diffie-Hellman primitive and the
key derivation function based on SHA-1 (ANSI X9.63).
AlgorithmID.dhSinglePass_cofactorDH_sha1kdf_scheme.public static AlgorithmID dhSinglePass_cofactorDH_sha224kdf_scheme
public static AlgorithmID dhSinglePass_cofactorDH_sha256kdf_scheme
public static AlgorithmID dhSinglePass_cofactorDH_sha384kdf_scheme
public static AlgorithmID dhSinglePass_cofactorDH_sha512kdf_scheme
public static AlgorithmID aes_128_wrap
AesKeyWrap key wrap
algorithm for wrapping 128-bit AES content encryption keys with
128-bit AES key encryption keys (RFC 3394).
AlgorithmID.aes_128_wrap.public static AlgorithmID aes_192_wrap
AesKeyWrap key wrap
algorithm for wrapping 192-bit AES content encryption keys with
192-bit AES key encryption keys (RFC 3394).
AlgorithmID.aes_192_wrap.public static AlgorithmID aes_256_wrap
AesKeyWrap key wrap
algorithm for wrapping 256-bit AES content encryption keys with
256-bit AES key encryption keys (RFC 3394).
AlgorithmID.aes_256_wrap.public static final AlgorithmID id_RSASAA_PSS
public AlgorithmID()
null
ObjectID and null parameters.public AlgorithmID(java.lang.String objectID,
java.lang.String name)
objectID - the object identifier of the algorithm as a string; e.g.
"2.5.8.1.1"name - the name for this object identifier; e.g "rsa"public AlgorithmID(java.lang.String objectID,
java.lang.String name,
java.lang.String implementationName)
objectID - the object identifier of the algorithm as a string; e.g.
"1.2.840.113549.3.7"name - the name for this object identifier; e.g "DES-EDE3-CBC"implementationName - the internal implementation name; e.g. "DESede/CBC/PKCS5Padding"public AlgorithmID(ObjectID algorithm, java.lang.String implementationName)
algorithm - the ObjectID of the algorithmimplementationName - the internal implementation name; e.g. "DESede/CBC/PKCS5Padding"public AlgorithmID(ObjectID algorithm)
algorithm - the ObjectID of the algorithmpublic AlgorithmID(ObjectID algorithm, ASN1Object parameter)
algorithm - the ObjectID of the algorithmparameter - the algorithm parameterspublic AlgorithmID(ASN1Object algorithmID) throws CodingException
toASN1Object()method.algorithmID - the AlgorithmID as ASN1ObjectCodingException - if the ASN1Object is no AlgorithmIDpublic AlgorithmID(DerInputStream is) throws java.io.IOException
The given DerInputStreamsupplies DER
encoded data that represents an already existing AlgorithmID.
Note: This method will decode Algorithm parameters which have been encoded with a Null algorithm parameter as well as Algorithm parameters which have been omitted from the sequence. See RFC 3274 section 2.1.
is - the DerInputStream supplying the DER encoded ASN1Objectjava.io.IOException - if an I/O or decoding error occurspublic static boolean changeObjectID(AlgorithmID algID, ObjectID oid)
This method may be used to allocate a new object identifier to an already existing AlgorithmID. With JDK 1.2 the SUN provider, for instance, has changed the algorithm oid of the DSA algorithm from 1.3.14.3.2.12 to 1.2.840.10040.4.1, whereas IAIK continues to use 1.3.14.3.2.12. An application wishing to use the new OID, can allocate it by using this method, e.g.:
ObjectID oid = new ObjectID("1.2.840.10040.4.1", "DSA");
AlgorithmID.changeObjectID(AlgorithmID.dsa, oid);
If you only want to change the OID string, but keep name and shortName,
you may use method changeOIDString(AlgorithmID algID, String oidString).algID - the AlgorithmID to which a new OID shall be allocatedoid - the new object identifierpublic static boolean changeOIDString(AlgorithmID algID, java.lang.String oidString)
This method may be used to allocate a new object identifier to an already existing AlgorithmID. With JDK 1.2 the SUN provider, for instance, has changed the algorithm oid of the DSA algorithm from 1.3.14.3.2.12 to 1.2.840.10040.4.1, whereas IAIK continues to use 1.3.14.3.2.12. An application wishing to use the new OID, can allocate it by using this method, e.g.:
AlgorithmID.changeOIDString(AlgorithmID.dsa, "1.2.840.10040.4.1");This method adopts any registered name and shortName from the old object identifier; and only changes the OID string. To set an entire new object identifier, use method
changeObjectID(AlgorithmID, ObjectID).algID - the AlgorithmID to which a new OID shall be allocatedoidString - the new object identifierpublic void decode(ASN1Object algorithmID) throws CodingException
The supplied ASN1Object represents an already existing AlgorithmID that
may have been created by means of the
toASN1Object()method.
decode in interface ASN1TypealgorithmID - the AlgorithmID as ASN1ObjectCodingException - if the ASN1Object is no AlgorithmIDpublic void encodeAbsentParametersAsNull(boolean useNULLForAbsentParameters)
An application (e.g. X.509) may require to omit the parameters field in
the AlgorihmID encoding of some specific algorithm (e.g. dsaWithSHA1,
ecdsaWithSHA1) if no parameters are set. This method may be used to
decide whether absent parameters shall be encoded as ASN.1 NULL object or
shall be omitted from the encoding at all. Note that per default absent
parameters are encoded as NULL by the static registered AlgorithmIDs of
this class, except for those algorithms (like
dsaWithSHA1, ecdsaWithSHA1)
where it is explicitly announced by the Javadoc that absent parameters
are omitted.
useNULLForAbsentParameters - true if absent parameters shall be encoded as
NULL, false if absent parameters shall be
omitted from the encodingpublic ASN1Object toASN1Object()
toASN1Object in interface ASN1TypeSEQUENCEpublic ASN1Object toASN1Object(boolean useNULLForAbsentParameters)
public java.lang.String getImplementationName()
throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException - if there is no name for the implementationpublic java.lang.Object getInstance()
throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException - if there is no implementationpublic java.lang.Object getInstance(java.lang.String provider)
throws java.security.NoSuchAlgorithmException
provider - the name of the requested providerjava.security.NoSuchAlgorithmException - if there is no implementationpublic javax.crypto.Cipher getCipherInstance()
throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException - if there is no Cipher implementationpublic javax.crypto.Cipher getCipherInstance(java.lang.String provider)
throws java.security.NoSuchAlgorithmException
provider - the name of the requested providerjava.security.NoSuchAlgorithmException - if there is no Cipher implementationpublic java.security.Signature getSignatureInstance()
throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException - if there is no Signature implementationpublic java.security.Signature getSignatureInstance(java.lang.String provider)
throws java.security.NoSuchAlgorithmException
provider - the name of the requested providerjava.security.NoSuchAlgorithmException - if there is no Signature implementationpublic void initSignatureVerify(java.security.Signature signatureAlg,
java.security.PublicKey verificationKey)
throws java.security.InvalidAlgorithmParameterException,
java.security.InvalidKeyException
Signature algorithm instance for
verification with the specified verification public key and algorithm
parameters from the Algorithm Identifier.
For an Algorithm Identifier that contains algorithms parameters, these
parameters are extracted, decoded, and set in the Signature
algorithm instance prior to initialization. This ensures that the
algorithm parameters specified inside an Algorithm Identifier are
actually used during signature verification; some signature algorithms
require algorithm parameters (ex: RSA-PSS).
This API was introduced to provide better support for the RSA-PSS
signature algorithm, which requires algorithm parameters. It is used
throughout the Toolkit for signature verification purposes. It should be
used in conjunction with the getSignatureInstance() or
getSignatureInstance(String) APIs to instantiate and then
initialize a Signature algorithm instance.
Signature class was not designed to allow
algorithm parameters to be set in a provider independent manner; the
Signature class only accepts algorithm parameters in
AlgorithmParameterSpec format. This API extracts the
algorithm parameters from the Algorithm Identifier in DER encoded ASN.1
format and then converts them to one of Entrust's
AlgorithmParameterSpec implementations. (The actual
AlgorithmParameterSpec used are registered in Entrust's
AlgorithmID class, for more details refer to
AlgorithmID.getAlgorithmParameterSpec()).
These implementations will most likely only be compatible with Entrust's
Signature algorithm implementations. For this reason, when
using this API to instantiate and initialize a Signature
algorithm instance from a non-Entrust JCA/JCE cryptographic service
provider, and algorithm parameters are specified in the Algorithm
Identifier, an InvalidAlgorithmParameterException may
result.signatureAlg - the Signature algorithm implementation to be
initialized for verificationverificationKey - the public verification keyjava.security.InvalidKeyException - if the public verification key is not appropriate for the
Signature algorithm implementationjava.security.InvalidAlgorithmParameterException - if the algorithm parameters are not supported by the
Signature algorithm implementation or the
algorithm parameters could not be converted from DER encoded
ASN.1 format to AlgorithmParameterSpec formatpublic void initSignatureSign(java.security.Signature signatureAlg,
java.security.PrivateKey signingKey)
throws java.security.InvalidAlgorithmParameterException,
java.security.InvalidKeyException
Signature algorithm instance for
signing with the specified signing private key and algorithm
parameters from the Algorithm Identifier.
For an Algorithm Identifier that contains algorithms parameters, these
parameters are extracted, decoded, and set in the Signature
algorithm instance prior to initialization. This ensures that the
algorithm parameters specified inside an Algorithm Identifier are
actually used during signature generation (some signature algorithms
require algorithm parameters).
After the Signature algorithm instance has been
initialized, the algorithm parameters it is configured to use are
extracted, encoded, and stored back in Algorithm Identifier. This ensures
that the algorithm parameters that are actually used by the
Signature algorithm implementation are not discarded. This
is important for signature algorithms that automatically generate their
own default parameters when none are provided (ex: RSA-PSS).
This API was introduced to provide better support for the RSA-PSS
signature algorithm, which requires algorithm parameters. It is used
throughout the Toolkit for signature generation purposes. It should be
used in conjunction with the getSignatureInstance() or
getSignatureInstance(String) APIs to instantiate and then
initialize a Signature algorithm instance.
Signature class was not designed to allow
algorithm parameters to be set in a provider independent manner; the
Signature class only accepts algorithm parameters in
AlgorithmParameterSpec format. This API extracts the
algorithm parameters from the Algorithm Identifier in DER encoded ASN.1
format and then converts them to one of Entrust's
AlgorithmParameterSpec implementations. (The actual
AlgorithmParameterSpec used are registered in Entrust's
AlgorithmID class, for more details refer to
AlgorithmID.getAlgorithmParameterSpec()).
These implementations will most likely only be compatible with Entrust's
Signature algorithm implementations. For this reason, when
using this API to instantiate and initialize a Signature
algorithm instance from a non-Entrust JCA/JCE cryptographic service
provider, and algorithm parameters are specified in the Algorithm
Identifier, an InvalidAlgorithmParameterException may
result.signatureAlg - the Signature algorithm implementation to be
initialized for signingsigningKey - the private signing keyjava.security.InvalidKeyException - if the private signing key is not appropriate for the
Signature algorithm implementationjava.security.InvalidAlgorithmParameterException - if the algorithm parameters are not supported by the
Signature algorithm implementation or the
algorithm parameters could not be converted from DER encoded
ASN.1 format to AlgorithmParameterSpec formatpublic AlgorithmID toEntrustAlgorithmID()
The Algorithm Identifier components (identifier and parameters) are passed by reference (a deep copy of the elements is not done).
public java.security.MessageDigest getMessageDigestInstance()
throws java.security.NoSuchAlgorithmException
MessageDigest implementation for this
AlgorithmIdentifier.
This method requests a MessageDigest instance from the
JCA/JCE; it attempts each of the following algorithm name representations
using the following providers in order (the first implementation that is
found is returned):
java.security.NoSuchAlgorithmException - if an implementation of the message digest algorithm could
not be obtained from any of the installed providerspublic java.security.MessageDigest getMessageDigestInstance(java.lang.String provider)
throws java.security.NoSuchAlgorithmException
MessageDigest implementation for this
AlgorithmIdentifier.
This method requests a MessageDigest instance from the
JCA/JCE; it attempts each of the following algorithm name representations
using the specifeid provider in order (the first implementation that is
found is returned):
provider - the name of the requested providerjava.security.NoSuchAlgorithmException - if an implementation of the message digest algorithm could
not be obtained from the specified providerpublic javax.crypto.KeyAgreement getKeyAgreementInstance()
throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException - if there is no KeyAgreement implementationpublic javax.crypto.KeyAgreement getKeyAgreementInstance(java.lang.String provider)
throws java.security.NoSuchAlgorithmException
provider - the name of the requested providerjava.security.NoSuchAlgorithmException - if there is no KeyAgreement implementationpublic java.security.KeyFactory getKeyFactoryInstance()
throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException - if there is no KeyFactory implementationpublic java.security.KeyFactory getKeyFactoryInstance(java.lang.String provider)
throws java.security.NoSuchAlgorithmException
provider - the name of the requested providerjava.security.NoSuchAlgorithmException - if there is no KeyFactory implementationpublic java.security.KeyPairGenerator getKeyPairGeneratorInstance()
throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException - if there is no KeyPairGenerator implementationpublic java.security.KeyPairGenerator getKeyPairGeneratorInstance(java.lang.String provider)
throws java.security.NoSuchAlgorithmException
This method calls KeyPairGenerator.getInstance(algorithm,provider) by substituting the algorithmID´s
provider - the name of the requested providerjava.security.NoSuchAlgorithmException - if there is no KeyPairGenerator implementationpublic javax.crypto.KeyGenerator getKeyGeneratorInstance()
throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException - if there is no KeyGenerator implementationpublic javax.crypto.KeyGenerator getKeyGeneratorInstance(java.lang.String provider)
throws java.security.NoSuchAlgorithmException
This method calls KeyGenerator.getInstance(algorithm,provider) by substituting the algorithmID´s
provider - the name of the requested providerjava.security.NoSuchAlgorithmException - if there is no KeyGenerator implementationpublic javax.crypto.SecretKeyFactory getSecretKeyFactoryInstance()
throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException - if there is no SecretKeyFactory implementationpublic javax.crypto.SecretKeyFactory getSecretKeyFactoryInstance(java.lang.String provider)
throws java.security.NoSuchAlgorithmException
This method calls SecretKeyFactory.getInstance(algorithm,provider) by substituting the algorithmID´s
provider - the name of the requested providerjava.security.NoSuchAlgorithmException - if there is no SecretKeyFactory implementationpublic java.lang.String getRawImplementationName()
throws java.security.NoSuchAlgorithmException
In some situations (e.g. for instantiating a KeyGenerator,...) it might
be useful to know the implementation name of the algorithm only and not
whole the implementation name which --
in the case of ciphers -- may represent the whole transformation string
required when creating the corresponding Cipher object. The, for
instance, implementation name for
DES-CBC may be "DES/CBC/PKC5Padding" which may be suitable for creating a
Cipher object, but not for creating a key generator where only "DES" is
required as returned by this method.
java.security.NoSuchAlgorithmExceptionpublic java.lang.Object clone()
clone in class java.lang.Objectpublic ObjectID getAlgorithm()
ObjectIDpublic ASN1Object getParameter()
public boolean getDecodedAbsentParameters()
public java.security.AlgorithmParameters getAlgorithmParameters(java.lang.String algorithm)
throws java.security.NoSuchAlgorithmException
java.security.AlgorithmParameters object.algorithm - the name of the algorithm the parameters belong tojava.security.NoSuchAlgorithmException - if there are no parameters to returnpublic java.security.AlgorithmParameters getAlgorithmParameters(java.lang.String algorithm,
java.lang.String provider)
throws java.security.NoSuchAlgorithmException
java.security.AlgorithmParameters object.algorithm - the name of the algorithm the parameters belong toprovider - the name of the cryptography provider from which the
AlgorithmParameters object should be createdjava.security.NoSuchAlgorithmException - if there are no parameters to returnpublic java.security.AlgorithmParameters getAlgorithmParameters()
throws java.security.NoSuchAlgorithmException
java.security.AlgorithmParameters object.
In contrast to method
getAlgorithmParameters(String
algorithm) where the name used for instantiating the required
AlgorithmParameters engine has to be supplied, this method tries to get
the name from the raw implementation
name.
null if no parameters
are includedjava.security.NoSuchAlgorithmException - if there are no parameters to returnpublic void setAlgorithmParameters(java.security.AlgorithmParameters parameters)
java.security.AlgorithmParameters object.parameters - the parameters of the algorithmpublic void setParameter(ASN1Object parameters)
parameters - the parameters of the algorithmpublic java.lang.String getName()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the other AlgorithmIDtrue, if the two AlgorithmIDs are equal,
false otherwisepublic java.lang.String toString()
toString in class java.lang.Object