public class AlgorithmID extends java.lang.Object implements ASN1Type, java.lang.Cloneable
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.sha1WithRSAEncryption, issuerPrivateKey);
This class statically registers algorithmIDs 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.sha1WithRSAEncryption;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 algorithms
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
IAIK
provider) 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 "SHA1/RSA" algorithm.
However the sha1WithRSAEncryption
variable of
this class only associates the "1.2.840.113549.1.1.5" object identifier with
the "SHA1/RSA" algorithm by statically calling
public static final AlgorithmID sha1WithRSAEncryption = new AlgorithmID( "1.2.840.113549.1.1.5", "sha1WithRSAEncryption", "SHA/RSA");Now, if you prefer to use "1.3.14.3.2.29" instead of "1.2.840.113549.1.1.5" you additionally may register this OID by calling:
AlgorithmID algID = new AlgorithmID("1.3.14.3.2.29", "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 handled properly. Note that proper parsing for "SHA/RSA" with "1.3.14.3.2.29" already is ensured by alias registration in the IAIK provider. However you may wish to create a new "SHA/RSA" AlgorithmID for "1.3.14.3.2.29", or you may know of a object ID which already is not registered as alias (in fact, "1.3.14.3.2.29" already is registered by variable
sha1WithRSAEncryption_
, so above may only
serve as an example) . 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_CBC
cipher algorithmID statically is
registered by using the "DES/CBC/PKCS5Padding" transformation string as
implementation name:
public static final 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, as also done by the IAIK provider.
An application wishing to use 1.3.14.3.2.12 may allocate it by:
AlgorithmID.changeOIDString(AlgorithmID.dsa, "1.3.14.3.2.12");or
ObjectID oid = new ObjectID("1.3.14.3.2.12", "DSA", "DSA"); AlgorithmID.changeObjectID(AlgorithmID.dsa, oid);Attention You should
clone
an algorithmID before
adding parameters to avoid unintentional parameter allocation!ASN1Type
,
ASN1Object
,
ObjectID
Modifier and Type | Field and Description |
---|---|
static AlgorithmID |
aes_CBC_CMAC_128
Creates an AlgorithmID for the AES-CBC-CMAC authenticated encryption algorithm
using 128 bit AES keys as defined by the BSI Technical Guideline TR-03109-1.
|
static AlgorithmID |
aes_CBC_CMAC_192
Creates an AlgorithmID for the AES-CBC-CMAC authenticated encryption algorithm
using 192 bit AES keys as defined by the BSI Technical Guideline TR-03109-1.
|
static AlgorithmID |
aes_CBC_CMAC_256
Creates an AlgorithmID for the AES-CBC-CMAC authenticated encryption algorithm
using 256 bit AES keys as defined by the BSI Technical Guideline TR-03109-1.
|
static AlgorithmID |
aes128_CBC
Creates an AlgorithmID for the AES symmetric block cipher used in CBC mode
with 128 bit keys.
|
static AlgorithmID |
aes128_CCM
Creates an AlgorithmID for the AES symmetric block cipher used in CCM mode
with 128 bit keys (aes128-CCM authenticated encryption algorithm id
according RFC 5084).
|
static AlgorithmID |
aes128_GCM
Creates an AlgorithmID for the AES symmetric block cipher used in GCM mode
with 128 bit keys (aes128-GCM authenticated encryption algorithm id
according RFC 5084).
|
static AlgorithmID |
aes128_wrap_pad
Creates an AlgorithmID for the RFC 5649 AES Key Wrap with Padding algorithm
using a 128 bit AES key as key encryption key.
|
static AlgorithmID |
aes192_CBC
Creates an AlgorithmID for the AES symmetric block cipher used in CBC mode
with 192 bit keys.
|
static AlgorithmID |
aes192_CCM
Creates an AlgorithmID for the AES symmetric block cipher used in CCM mode
with 192 bit keys (aes192-CCM authenticated encryption algorithm id
according RFC 5084).
|
static AlgorithmID |
aes192_GCM
Creates an AlgorithmID for the AES symmetric block cipher used in GCM mode
with 192 bit keys (aes192-GCM authenticated encryption algorithm id
according RFC 5084).
|
static AlgorithmID |
aes192_wrap_pad
Creates an AlgorithmID for the RFC 5649 AES Key Wrap with Padding algorithm
using a 192 bit AES key as key encryption key.
|
static AlgorithmID |
aes256_CBC
Creates an AlgorithmID for the AES symmetric block cipher used in CBC mode
with 256 bit keys.
|
static AlgorithmID |
aes256_CCM
Creates an AlgorithmID for the AES symmetric block cipher used in CCM mode
with 256 bit keys (aes256-CCM authenticated encryption algorithm id
according RFC 5084).
|
static AlgorithmID |
aes256_GCM
Creates an AlgorithmID for the AES symmetric block cipher used in GCM mode
with 256 bit keys (aes256-GCM authenticated encryption algorithm id
according RFC 5084).
|
static AlgorithmID |
aes256_wrap_pad
Creates an AlgorithmID for the RFC 5649 AES Key Wrap with Padding algorithm
using a 256 bit AES key as key encryption key.
|
protected static java.util.Hashtable |
algorithms
Reverse implementation repository.
|
static AlgorithmID |
arcfour
Creates an AlgorithmID for the
ARCFOUR stream cipher. |
static AlgorithmID |
camellia128_CBC
Creates an AlgorithmID for the Camellia symmetric block cipher used in CBC
mode with 128 bit keys.
|
static AlgorithmID |
camellia192_CBC
Creates an AlgorithmID for the Camellia symmetric block cipher used in CBC
mode with 192 bit keys.
|
static AlgorithmID |
camellia256_CBC
Creates an AlgorithmID for the Camellia symmetric block cipher used in CBC
mode with 256 bit keys.
|
static AlgorithmID |
cast5_CBC
Creates an AlgorithmID for the
CAST5 symmetric block cipher
used in CBC mode. |
static AlgorithmID |
chacha20Poly1305
Creates an AlgorithmID for the ChaCha20Poly1305 AEAD cipher used for CMS
according RFC 8103).
|
static AlgorithmID |
cms_3DES_wrap
Creates an AlgorithmID for the
CMS3DESwrap key wrap algorithm
for wrapping 3DES content encryption keys with 3DES key encryption keys
(RFC 2630). |
static AlgorithmID |
cms_aes128_wrap
Creates an AlgorithmID for the
CMSAESwrap key wrap algorithm
using a 128 bit AES key as key encryption key (RFC 3394). |
static AlgorithmID |
cms_aes192_wrap
Creates an AlgorithmID for the
CMSAESwrap key wrap algorithm
using a 192 bit AES key as key encryption key (RFC 3394). |
static AlgorithmID |
cms_aes256_wrap
Creates an AlgorithmID for the
CMSAESwrap key wrap algorithm
using a 256 AES key as key encryption key (RFC 3394). |
static AlgorithmID |
cms_camellia128_wrap
Creates an AlgorithmID for the
CMSCamelliaWrap key wrap
algorithm using a 128 bit Camellia key as key encryption key (RFC 3657). |
static AlgorithmID |
cms_camellia192_wrap
Creates an AlgorithmID for the
CMSCamelliaWrap key wrap
algorithm using a 192 bit Camellia key as key encryption key (RFC 3657). |
static AlgorithmID |
cms_camellia256_wrap
Creates an AlgorithmID for the
CMSCamelliaWrap key wrap
algorithm using a 256 Camellia key as key encryption key (RFC 3657). |
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_HMACwith3DES_wrap
Creates an AlgorithmID for the
HMACwith3DESwrap key wrap
algorithm for wrapping a HMAC key with a 3DES key encryption key (RFC
3537). |
static AlgorithmID |
cms_HMACwithAES_wrap
Creates an AlgorithmID for the
HMACwithAESwrap key wrap
algorithm for wrapping a HMAC key with a AES key encryption key (RFC 3537). |
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_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 RFC 3278
dhSinglePass-cofactorDH-sha1kdf-scheme
key encryption algorithm for using the cofactor ECDH primitive with ASNI-X9.63-KDF
key derivation function with hash algorithm SHA-1. |
static AlgorithmID |
dhSinglePass_cofactorDH_sha224kdf_scheme
Creates an AlgorithmID for the
dhSinglePass-cofactorDH-sha224kdf-scheme
key encryption algorithm specified by SEC1 and RFC 5753 for using the cofactor ECDH primitive with
ASNI-X9.63-KDF key derivation function with hash algorithm SHA-224. |
static AlgorithmID |
dhSinglePass_cofactorDH_sha256kdf_scheme
Creates an AlgorithmID for the
dhSinglePass-cofactorDH-sha256kdf-scheme
key encryption algorithm specified by SEC1 and RFC 5753 for using the cofactor ECDH primitive with
ASNI-X9.63-KDF key derivation function with hash algorithm SHA-256. |
static AlgorithmID |
dhSinglePass_cofactorDH_sha384kdf_scheme
Creates an AlgorithmID for the
dhSinglePass-cofactorDH-sha384kdf-scheme
key encryption algorithm specified by SEC1 and RFC 5753 for using the cofactor ECDH primitive with
ASNI-X9.63-KDF key derivation function with hash algorithm SHA-384. |
static AlgorithmID |
dhSinglePass_cofactorDH_sha512kdf_scheme
Creates an AlgorithmID for the
dhSinglePass-cofactorDH-sha512kdf-scheme
key encryption algorithm specified by SEC1 and RFC 5753 for using the cofactor ECDH primitive with
ASNI-X9.63-KDF key derivation function with hash algorithm SHA-512. |
static AlgorithmID |
dhSinglePass_stdDH_hkdf_sha256_scheme
Creates an AlgorithmID for the RFC 8418
dhSinglePass-stdDH-hkdf-sha256-scheme
key encryption algorithm for using the standard ECDH primitive with the HKDF
key derivation function (RFC 5869) with hash algorithm SHA-256. |
static AlgorithmID |
dhSinglePass_stdDH_hkdf_sha384_scheme
Creates an AlgorithmID for the RFC 8418
dhSinglePass-stdDH-hkdf-sha384-scheme
key encryption algorithm for using the standard ECDH primitive with the HKDF
key derivation function (RFC 5869) with hash algorithm SHA-384. |
static AlgorithmID |
dhSinglePass_stdDH_hkdf_sha512_scheme
Creates an AlgorithmID for the RFC 8418
dhSinglePass-stdDH-hkdf-sha512-scheme
key encryption algorithm for using the standard ECDH primitive with the HKDF
key derivation function (RFC 5869) with hash algorithm SHA-512. |
static AlgorithmID |
dhSinglePass_stdDH_sha1kdf_scheme
Creates an AlgorithmID for the RFC 3278
dhSinglePass-stdDH-sha1kdf-scheme
key encryption algorithm for using the standard ECDH primitive with ASNI-X9.63-KDF
key derivation function with hash algorithm SHA-1. |
static AlgorithmID |
dhSinglePass_stdDH_sha224kdf_scheme
Creates an AlgorithmID for the
dhSinglePass-stdDH-sha224kdf-scheme
key encryption algorithm specified by SEC1 and RFC 5753 for using the standard
ECDH primitive with ASNI-X9.63-KDF key derivation function with hash algorithm SHA-224. |
static AlgorithmID |
dhSinglePass_stdDH_sha256kdf_scheme
Creates an AlgorithmID for the RFC 5008 Suite B
dhSinglePass-stdDH-sha256kdf-scheme
key encryption algorithm (SEC1, RFC 5753) for using the standard ECDH primitive with ASNI-X9.63-KDF
key derivation function with hash algorithm SHA-256. |
static AlgorithmID |
dhSinglePass_stdDH_sha384kdf_scheme
Creates an AlgorithmID for the RFC 5008 Suite B
dhSinglePass-stdDH-sha384kdf-scheme
key encryption algorithm (SEC1, RFC 5753) for using the standard ECDH primitive with ASNI-X9.63-KDF
key derivation function with hash algorithm SHA-384. |
static AlgorithmID |
dhSinglePass_stdDH_sha512kdf_scheme
Creates an AlgorithmID for the
dhSinglePass-stdDH-sha512kdf-scheme
key encryption algorithm specified by SEC1 and RFC 5753 for using the standard ECDH primitive
with ASNI-X9.63-KDF key derivation function with hash algorithm SHA-512. |
static AlgorithmID |
dsa
Creates an AlgorithmID for the
DSA algorithm (used with
KeyFactories). |
static AlgorithmID |
dsa_
Creates an alternative AlgorithmID for the
DSA algorithm (used
with key factories). |
static AlgorithmID |
dsa_With_SHA1
Deprecated.
standard Algorithm Identifier for dsaWithSHA1 is
dsaWithSHA1 (1.2.840.10040.4.3) |
static AlgorithmID |
dsaWithSHA
Creates an AlgorithmID for the
dsaWithSHA signature algorithm
(addresses the same Signature engine as dsaWithSHA1). |
static AlgorithmID |
dsaWithSHA1
Creates an AlgorithmID for the
dsaWithSHA signature algorithm
(addresses the same Signature engine as dsaWithSHA1). |
static AlgorithmID |
dsaWithSHA1_
Deprecated.
standard Algorithm Identifier for dsaWithSHA1 is
dsaWithSHA1 (1.2.840.10040.4.3) |
static AlgorithmID |
dsaWithSHA224
Creates an AlgorithmID for the
dsaWithSHA224 signature
algorithm. |
static AlgorithmID |
dsaWithSHA256
Creates an AlgorithmID for the
dsaWithSHA256 signature
algorithm. |
static AlgorithmID |
dsaWithSHA3_224
Creates an AlgorithmID for the
dsaWithSHA3-224 signature
algorithm. |
static AlgorithmID |
dsaWithSHA3_256
Creates an AlgorithmID for the
dsaWithSHA3-256 signature
algorithm. |
static AlgorithmID |
dsaWithSHA3_384
Creates an AlgorithmID for the
dsaWithSHA3-384 signature
algorithm. |
static AlgorithmID |
dsaWithSHA3_512
Creates an AlgorithmID for the
dsaWithSHA3-512 signature
algorithm. |
static AlgorithmID |
dsaWithSHA384
Creates an AlgorithmID for the
dsaWithSHA384 signature
algorithm. |
static AlgorithmID |
dsaWithSHA512
Creates an AlgorithmID for the
dsaWithSHA512 signature
algorithm. |
static AlgorithmID |
ecDH
Creates an AlgorithmID for the
id-ecDH public key algorithm
(RFC 5480, used with key factories). |
static AlgorithmID |
ecdsa
Creates an AlgorithmID for the
ECDSA algorithm (used with key
factories). |
static AlgorithmID |
ecdsa_plain_With_RIPEMD160
Creates an AlgorithmID for the
ecdsa-plain-RIPEMD160 signature
algorithm as defined by the German BSI Technical Guideline TR-03111. |
static AlgorithmID |
ecdsa_plain_With_SHA1
Creates an AlgorithmID for the
ecdsa-plain-SHA1 signature
algorithm as defined by the German BSI Technical Guideline TR-03111. |
static AlgorithmID |
ecdsa_plain_With_SHA224
Creates an AlgorithmID for the
ecdsa-plain-SHA224 signature
algorithm as defined by the German BSI Technical Guideline TR-03111. |
static AlgorithmID |
ecdsa_plain_With_SHA256
Creates an AlgorithmID for the
ecdsa-plain-SHA256 signature
algorithm as defined by the German BSI Technical Guideline TR-03111. |
static AlgorithmID |
ecdsa_plain_With_SHA384
Creates an AlgorithmID for the
ecdsa-plain-SHA384 signature
algorithm as defined by the German BSI Technical Guideline TR-03111. |
static AlgorithmID |
ecdsa_plain_With_SHA512
Creates an AlgorithmID for the
ecdsa-plain-SHA512 signature
algorithm as defined by the German BSI Technical Guideline TR-03111. |
static AlgorithmID |
ecdsa_With_SHA1
Creates an AlgorithmID for the
ecdsa-with-SHA1 signature
algorithm as specified by ANSI X9.62. |
static AlgorithmID |
ecdsa_With_SHA224
Creates an AlgorithmID for the
ecdsa-with-SHA224 signature
algorithm as specified by ANSI X9.62:2005. |
static AlgorithmID |
ecdsa_With_SHA256
Creates an AlgorithmID for the
ecdsa-with-SHA256 signature
algorithm as specified by ANSI X9.62:2005. |
static AlgorithmID |
ecdsa_With_SHA3_224
Creates an AlgorithmID for the
ecdsa-with-SHA3-224 signature
algorithm as specified by ANSI ANSI X9.62:2005. |
static AlgorithmID |
ecdsa_With_SHA3_256
Creates an AlgorithmID for the
ecdsa-with-SHA3-256 signature
algorithm as specified by ANSI ANSI X9.62:2005. |
static AlgorithmID |
ecdsa_With_SHA3_384
Creates an AlgorithmID for the
ecdsa-with-SHA3-384 signature
algorithm as specified by ANSI ANSI X9.62:2005. |
static AlgorithmID |
ecdsa_With_SHA3_512
Creates an AlgorithmID for the
ecdsa-with-SHA3-512 signature
algorithm as specified by ANSI ANSI X9.62:2005. |
static AlgorithmID |
ecdsa_With_SHA384
Creates an AlgorithmID for the
ecdsa-with-SHA384 signature
algorithm as specified by ANSI X9.62:2005. |
static AlgorithmID |
ecdsa_With_SHA512
Creates an AlgorithmID for the
ecdsa-with-SHA512 signature
algorithm as specified by ANSI X9.62:2005. |
static AlgorithmID |
ecka_eg_X963KDF_SHA256
AlgorithmID for ECKA-EG ECC Key Agreement according to BSI TR-03111,
BSI TR-03109-1 using ANSI X9.63 KDF with SHA-256.
|
static AlgorithmID |
ecka_eg_X963KDF_SHA384
AlgorithmID for ECKA-EG ECC Key Agreement according to BSI TR-03111,
BSI TR-03109-1 using ANSI X9.63 KDF with SHA-384.
|
static AlgorithmID |
ecka_eg_X963KDF_SHA512
AlgorithmID for ECKA-EG ECC Key Agreement according to BSI TR-03111,
BSI TR-03109-1 sing ANSI X9.63 KDF with SHA-512.
|
static AlgorithmID |
ecPublicKey
Creates an AlgorithmID for the
id-ecPublicKey algorithm (RFC
5480, used with key factories). |
static AlgorithmID |
ed25519
AlgorithmID for the Ed25519 key/signature algorithm for using the EdDSA signature
algorithm according to RFC 8410, RFC 8419.
|
static AlgorithmID |
ed448
AlgorithmID for the Ed448 key/signature algorithm for using the EdDSA signature
algorithm according to RFC 8410, RFC 8419.
|
static AlgorithmID |
elGamal
Creates an AlgorithmID for the ElGamal 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 |
gost3410
Creates an AlgorithmID for the
gostR3410-2001 signature
algorithm as specified by RFC 5832. |
static AlgorithmID |
gost3411
Creates an AlgorithmID for the
GOST-R-34.11-94 message digest
algorithm which is the same as GOST3411 . |
static AlgorithmID |
hkdf_with_SHA256
AlgorithmID for id-alg-hkdf-with-sha256 according to RFC 8619 for using
the HKDF key derivation function (RFC 5869) with SHA-256.
|
static AlgorithmID |
hkdf_with_SHA384
AlgorithmID for id-alg-hkdf-with-sha384 according to RFC 8619 for using
the HKDF key derivation function (RFC 5869) with SHA-384.
|
static AlgorithmID |
hkdf_with_SHA512
AlgorithmID for id-alg-hkdf-with-sha512 according to RFC 8619 for using
the HKDF key derivation function (RFC 5869) with SHA-512.
|
static AlgorithmID |
hMAC_GOST
Creates an AlgorithmID for the
HMAC_GOSTR3411 message authentication
algorithm. |
static AlgorithmID |
hMAC_MD5
Creates an AlgorithmID for the
hMAC-SHA1 message authentication
algorithm. |
static AlgorithmID |
hMAC_RIPEMD160
Creates an AlgorithmID for the
hMAC-RIPEMD160 message digest
algorithm. |
static AlgorithmID |
hMAC_SHA1
Creates an AlgorithmID for the
hMAC-SHA1 message authentication
algorithm. |
static AlgorithmID |
hMAC_SHA1_
Creates an alternative (PKCS#5) AlgorithmID for the
hMAC-SHA1
message authentication algorithm. |
static AlgorithmID |
hMAC_SHA224
Creates an AlgorithmID for the
hMAC-SHA224 message authentication
algorithm (RFC 4231). |
static AlgorithmID |
hMAC_SHA256
Creates an AlgorithmID for the
hMAC-SHA256 message authentication
algorithm (RFC 4231). |
static AlgorithmID |
hMAC_SHA3_224
Creates an AlgorithmID for the
hMAC-SHA3-224 message authentication
algorithm. |
static AlgorithmID |
hMAC_SHA3_256
Creates an AlgorithmID for the
hMAC-SHA3-256 message authentication
algorithm. |
static AlgorithmID |
hMAC_SHA3_384
Creates an AlgorithmID for the
hMAC-SHA3-384 message authentication
algorithm. |
static AlgorithmID |
hMAC_SHA3_512
Creates an AlgorithmID for the
hMAC-SHA3-512 message authentication
algorithm. |
static AlgorithmID |
hMAC_SHA384
Creates an AlgorithmID for the
hMAC-SHA384 message authentication
algorithm (RFC 4231). |
static AlgorithmID |
hMAC_SHA512
Creates an AlgorithmID for the
hMAC-SHA512 message authentication
algorithm (RFC 4231). |
static AlgorithmID |
idea_CBC
Creates an AlgorithmID for the
IDEA symmetric block cipher
used in CBC mode. |
static AlgorithmID |
kdf1
Creates an AlgorithmID for the key derivation function
KDF1 defined in ISO18033-2. |
static AlgorithmID |
kdf2
Creates an AlgorithmID for the key derivation function
KDF2 defined in ANS X9.44. |
static AlgorithmID |
kdf3
Creates an AlgorithmID for the key derivation function
KDF3 defined in ANS X9.44. |
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 PKCS#1v2.1
MGF1 mask generation
function. |
static AlgorithmID |
pbes2
Creates an AlgorithmID for the
PBES2 encryption scheme
as defined by PKCS#5, 2.0 (cipher). |
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-derivation function
as defined by PKCS#5 (key generator). |
static AlgorithmID |
pSpecified
Creates an AlgorithmID for the PKCS#1v2.1
pSpecified
PSourceAlgorithm. |
static AlgorithmID |
pwri_kek
Creates an AlgorithmID for the CMS PWRI-KEK key wrap algorithm for wrapping
a content encryption key with a key derived from some password (RFC 3211, Password-based Encryption for
CMS).
|
static AlgorithmID |
rc2_CBC
Creates an AlgorithmID for the
RC2 [TM] symmetric block cipher
used in CBC mode. |
static AlgorithmID |
rc4
Creates an AlgorithmID for the
RC4 [TM] stream cipher. |
static AlgorithmID |
rc5_CBC
Creates an AlgorithmID for the
RC5 [TM] symmetric block cipher
used in CBC mode. |
static AlgorithmID |
ripeMd128
Creates an AlgorithmID for the
RipeMd128 message digest
algorithm. |
static AlgorithmID |
ripeMd128_ISO
Creates an AlgorithmID for the
RipeMd128 message digest
algorithm. |
static AlgorithmID |
ripeMd160
Creates an AlgorithmID for the
RipeMd160 message digest
algorithm. |
static AlgorithmID |
ripeMd160_ISO
Creates an AlgorithmID for the
RipeMd160 message digest
algorithm. |
static AlgorithmID |
ripeMd256
Creates an AlgorithmID for the
RipeMd256 message digest
algorithm. |
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
RSAES-OAEP encryption scheme. |
static AlgorithmID |
rsaKem
Creates an AlgorithmID for the
RSA Key Encapsulation Mechanism. |
static AlgorithmID |
rsaSignatureWithRipemd128
Creates an AlgorithmID for the
rsaSignatureWithRipemd128
signature algorithm. |
static AlgorithmID |
rsaSignatureWithRipemd160
Creates an AlgorithmID for the
rsaSignatureWithRipemd160
signature algorithm. |
static AlgorithmID |
rsaSignatureWithRipemd256
Creates an AlgorithmID for the
rsaSignatureWithRipemd256
signature algorithm. |
static AlgorithmID |
rsassaPss
Creates an AlgorithmID for the PKCS#1v2.1
RSASSA-PSS signature
algorithm. |
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 |
sha1WithRSAEncryption_
Creates an alternative AlgorithmID for the
sha1WithRSAEncryption signature algorithm. |
static AlgorithmID |
sha224
Creates an AlgorithmID for the
SHA-224 message digest
algorithm. |
static AlgorithmID |
sha224WithRSAEncryption
Creates an AlgorithmID for the
sha224WithRSAEncryption
signature algorithm (PKCS#1v2). |
static AlgorithmID |
sha256
Creates an AlgorithmID for the
SHA-256 message digest
algorithm. |
static AlgorithmID |
sha256WithRSAEncryption
Creates an AlgorithmID for the
sha256WithRSAEncryption
signature algorithm (PKCS#1v2). |
static AlgorithmID |
sha3_224
Creates an AlgorithmID for the
SHA3-224 message digest
algorithm as specified by NIST FIPS PUB 202. |
static AlgorithmID |
sha3_224WithRSAEncryption
Creates an AlgorithmID for the
sha3-224WithRSAEncryption
signature algorithm (PKCS#1v2). |
static AlgorithmID |
sha3_256
Creates an AlgorithmID for the
SHA3-256 message digest
algorithm as specified by NIST FIPS PUB 202. |
static AlgorithmID |
sha3_256WithRSAEncryption
Creates an AlgorithmID for the
sha3-256WithRSAEncryption
signature algorithm (PKCS#1v2). |
static AlgorithmID |
sha3_384
Creates an AlgorithmID for the
SHA3-384 message digest
algorithm as specified by NIST FIPS PUB 202. |
static AlgorithmID |
sha3_384WithRSAEncryption
Creates an AlgorithmID for the
sha3-384WithRSAEncryption
signature algorithm (PKCS#1v2). |
static AlgorithmID |
sha3_512
Creates an AlgorithmID for the
SHA3-512 message digest
algorithm as specified by NIST FIPS PUB 202. |
static AlgorithmID |
sha3_512WithRSAEncryption
Creates an AlgorithmID for the
sha3-512WithRSAEncryption
signature algorithm (PKCS#1v2). |
static AlgorithmID |
sha384
Creates an AlgorithmID for the
SHA-384 message digest
algorithm. |
static AlgorithmID |
sha384WithRSAEncryption
Creates an AlgorithmID for the
sha384WithRSAEncryption
signature algorithm (PKCS#1v2). |
static AlgorithmID |
sha512
Creates an AlgorithmID for the
SHA-512 message digest
algorithm. |
static AlgorithmID |
sha512_224
Creates an AlgorithmID for the
SHA-512/224 message digest
algorithm. |
static AlgorithmID |
sha512_224WithRSAEncryption
Creates an AlgorithmID for the
sha512-224WithRSAEncryption
signature algorithm (PKCS#1v2). |
static AlgorithmID |
sha512_256
Creates an AlgorithmID for the
SHA-512/256 message digest
algorithm. |
static AlgorithmID |
sha512_256WithRSAEncryption
Creates an AlgorithmID for the
sha512-256WithRSAEncryption
signature algorithm (PKCS#1v2). |
static AlgorithmID |
sha512WithRSAEncryption
Creates an AlgorithmID for the
sha512WithRSAEncryption
signature algorithm (PKCS#1v2). |
static AlgorithmID |
shake128
Creates an AlgorithmID for the SHA-3
SHAKE128 Extendable Output
Function (XOF) as specified by NIST FIPS PUB 202. |
static AlgorithmID |
shake128Len
Creates an AlgorithmID for the SHA-3
SHAKE128 Extendable Output
Function (XOF) as specified by NIST FIPS PUB 202 when used with output length
parameter; see NIST algorithm identifier registration at
Computer Security Objects Register. |
static AlgorithmID |
shake256
Creates an AlgorithmID for the SHA-3
SHAKE256 Extendable Output
Function (XOF) as specified by NIST FIPS PUB 202. |
static AlgorithmID |
shake256Len
Creates an AlgorithmID for the SHA-3
SHAKE256 Extendable Output
Function (XOF) as specified by NIST FIPS PUB 202 when used with output length
parameter; see NIST algorithm identifier registration at
Computer Security Objects Register. |
static AlgorithmID |
sigS_ISO9796_2rndWithripemd160
Creates a Teletrust AlgorithmID for the
sigS_ISO9796_2Withripemd160 signature algorithm (RSA based
ISO/IEC 9796-2 scheme with random number using RIPEMD-160 as hash algorithm
and "BC" as trailer field). |
static AlgorithmID |
sigS_ISO9796_2rndWithrsa
Creates a Teletrust AlgorithmID for the
sigS_ISO9796_2Withrsa
signature algorithm (RSA based ISO/IEC 9796-2 scheme S2, S3 with random
number). |
static AlgorithmID |
sigS_ISO9796_2rndWithsha1
Creates a Teletrust AlgorithmID for the
sigS_ISO9796_2Withsha1
signature algorithm (RSA based ISO/IEC 9796-2 scheme with random number
using SHA-1 as hash algorithm and "BC" as trailer field). |
static AlgorithmID |
sigS_ISO9796_2Withripemd160
Creates a Teletrust AlgorithmID for the
sigS_ISO9796_2Withripemd160 signature algorithm (RSA based
ISO/IEC 9796-2 scheme using RIPEMD-160 as hash algorithm and "BC"
as trailer field). |
static AlgorithmID |
sigS_ISO9796_2Withrsa
Creates a Teletrust AlgorithmID for the
sigS_ISO9796_2Withrsa
signature algorithm (RSA based ISO/IEC 9796-2 scheme S2, S3). |
static AlgorithmID |
sigS_ISO9796_2Withsha1
Creates a Teletrust AlgorithmID for the
sigS_ISO9796_2Withsha1
signature algorithm (RSA based ISO/IEC 9796-2 scheme using SHA-1 as hash
algorithm and "BC" as trailer field). |
static AlgorithmID |
ssdhKeyAgreement
Creates an AlgorithmID for the
Static-Static Diffie-Hellman
key agreement algorithm (CMS). |
static AlgorithmID |
whirlpool
Creates an AlgorithmID for the
Whirlpool message digest
algorithm. |
static AlgorithmID |
x25519
AlgorithmID for the X25519 key/DH algorithm according to RFC 8410.
|
static AlgorithmID |
x448
AlgorithmID for the X448 key/DH algorithm according to RFC 8410.
|
static AlgorithmID |
x9_63_kdf
AlgorithmID for the x9-63-kdf key derivation function according to ANSI X9.63-2001,
"American National Standard for Financial Services - Key Agreement and Key Transport
Using Elliptic Curve Cryptography" (November 2001) and
"Standards for Efficient Cryptography - SEC 1: Elliptic Curve Cryptography v2.0
(Certicom Research, 2009).
|
static AlgorithmID |
zlib_compress
Creates an AlgorithmID for the
ZLIB compression algorithm
([RFC1950] [RFC1951]). |
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(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 and
implementation name.
|
AlgorithmID(java.lang.String objectID,
java.lang.String name,
java.lang.String[] implementationNames,
boolean useNULLForAbsentParameters)
Creates a new AlgorithmID from an object identifier, a name and and
a set of implementation names.
|
AlgorithmID(java.lang.String objectID,
java.lang.String name,
java.lang.String[] implementationNames,
java.lang.Class algorithmParameterSpec)
Creates a new AlgorithmID from an object identifier, a name and and
a set of implementation names.
|
AlgorithmID(java.lang.String objectID,
java.lang.String name,
java.lang.String[] implementationNames,
java.lang.Class algorithmParameterSpec,
boolean useNULLForAbsentParameters)
Creates a new AlgorithmID from an object identifier, a name and and
a set of implementation names.
|
AlgorithmID(java.lang.String objectID,
java.lang.String name,
java.lang.String implementationName,
boolean useNULLForAbsentParameters)
Creates a new AlgorithmID from an object identifier, a name and and
implementation name.
|
AlgorithmID(java.lang.String objectID,
java.lang.String name,
java.lang.String implementationName,
java.lang.Class algorithmParameterSpec)
Creates a new AlgorithmID from an object identifier, a name and and
implementation name.
|
AlgorithmID(java.lang.String objectID,
java.lang.String name,
java.lang.String implementationName,
java.lang.Class algorithmParameterSpec,
boolean useNULLForAbsentParameters)
Creates a new AlgorithmID from an object identifier, a name and and
implementation name.
|
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.
|
boolean |
equals(java.lang.Object obj,
boolean checkParams)
Compares this AlgorithmID with the given AlgorithmID.
|
ObjectID |
getAlgorithm()
Returns the ObjectID of the algorithm.
|
static AlgorithmID |
getAlgorithmID(java.lang.String implementationName)
Returns an AlgorithmID for the given implementation name.
|
java.security.AlgorithmParameterGenerator |
getAlgorithmParameterGeneratorInstance()
Tries to find a AlgorithmParameterGenerator implementation for this AlgorithmIdentifier.
|
java.security.AlgorithmParameterGenerator |
getAlgorithmParameterGeneratorInstance(java.security.Provider provider)
Tries to find a AlgorithmParameterGenerator implementation for this AlgorithmIdentifier supported
by the given provider.
|
java.security.AlgorithmParameterGenerator |
getAlgorithmParameterGeneratorInstance(java.lang.String provider)
Tries to find a provider-specific AlgorithmParameterGenerator implementation for this
AlgorithmID.
|
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.security.Provider provider)
Returns the parameters of the given 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. |
java.security.AlgorithmParameters |
getAlgorithmParametersInstance(java.security.Provider provider)
Tries to find an AlgorithmParameters implementation for this AlgorithmIdentifier supported
by the given provider.
|
java.security.spec.AlgorithmParameterSpec |
getAlgorithmParameterSpec()
Same as
getAlgorithmParameterSpec(String) with null
as argument. |
java.security.spec.AlgorithmParameterSpec |
getAlgorithmParameterSpec(java.lang.Class parameterSpecClass,
java.security.Provider provider)
Returns the algorithm parameters (if included) of this AlgorithmID as
AlgorithmParameterSpec
instance of the given parameterSpecClass name. |
java.security.spec.AlgorithmParameterSpec |
getAlgorithmParameterSpec(java.lang.Class parameterSpecClass,
java.lang.String provider)
Returns the algorithm parameters (if included) of this AlgorithmID as
AlgorithmParameterSpec
instance of the given parameterSpecClass name. |
java.security.spec.AlgorithmParameterSpec |
getAlgorithmParameterSpec(java.security.Provider provider)
Returns the algorithm parameters (if included) of this AlgorithmID as
java.security.spec.AlgorithmParameterSpec object. |
java.security.spec.AlgorithmParameterSpec |
getAlgorithmParameterSpec(java.lang.String provider)
Returns the algorithm parameters (if included) of this AlgorithmID as
java.security.spec.AlgorithmParameterSpec object. |
javax.crypto.Cipher |
getCipherInstance()
Tries to find a Cipher implementation for this AlgorithmIdentifier.
|
javax.crypto.Cipher |
getCipherInstance(java.security.Provider provider)
Tries to find a Cipher implementation for this AlgorithmIdentifier supported
by the given provider.
|
javax.crypto.Cipher |
getCipherInstance(java.lang.String provider)
Tries to find a provider-specific Cipher implementation for this
AlgorithmIdentifier.
|
static boolean |
getDoNotIncludeParameters(AlgorithmID pkixSignatureAlgID)
Checks whether to include parameters in signature AlgoritmIDs when used in
PKIX certificate, crl, etc.
|
java.lang.String |
getImplementationName()
Returns the name for an implementation of this algorithm.
|
static java.lang.String[] |
getImplementationNames(AlgorithmID algorithmID)
Gets all implementation names registered for the given AlgorithmID.
|
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.
|
java.lang.String |
getJcaStandardName()
Returns the JCA standard name for an implementation of this algorithm.
|
javax.crypto.KeyAgreement |
getKeyAgreementInstance()
Tries to find a KeyAgreement implementation for this AlgorithmIdentifier.
|
javax.crypto.KeyAgreement |
getKeyAgreementInstance(java.security.Provider provider)
Tries to find a KeyAgreement implementation for this AlgorithmIdentifier supported
by the given provider.
|
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.security.Provider provider)
Tries to find a KeyFactory implementation for this AlgorithmIdentifier supported
by the given provider.
|
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.security.Provider provider)
Tries to find a KeyGenerator implementation for this AlgorithmIdentifier supported
by the given provider.
|
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.security.Provider provider)
Tries to find a KeyPairGenerator implementation for this AlgorithmIdentifier supported
by the given provider.
|
java.security.KeyPairGenerator |
getKeyPairGeneratorInstance(java.lang.String provider)
Tries to find a provider-specific KeyPairGenerator implementation for this
AlgorithmID.
|
javax.crypto.Mac |
getMacInstance()
Tries to find a Mac implementation for this AlgorithmIdentifier.
|
javax.crypto.Mac |
getMacInstance(java.security.Provider provider)
Tries to find a Mac implementation for this AlgorithmIdentifier supported
by the given provider.
|
javax.crypto.Mac |
getMacInstance(java.lang.String provider)
Tries to find a provider-specific Mac implementation for this
AlgorithmIdentifier.
|
MaskGenerationAlgorithm |
getMaskGenerationAlgorithmInstance()
Tries to find an PKCS#1 MaskGenerationAlgorithm implementation for this
AlgorithmIdentifier.
|
MaskGenerationAlgorithm |
getMaskGenerationAlgorithmInstance(java.security.Provider provider)
Tries to find a MaskGenerationAlgorithm implementation for this AlgorithmIdentifier supported
by the given provider.
|
MaskGenerationAlgorithm |
getMaskGenerationAlgorithmInstance(java.lang.String provider)
Tries to find an PKCS#1 MaskGenerationAlgorithm implementation for this
AlgorithmIdentifier.
|
java.security.MessageDigest |
getMessageDigestInstance()
Tries to find a MessageDigest implementation for this AlgorithmIdentifier.
|
java.security.MessageDigest |
getMessageDigestInstance(java.security.Provider provider)
Tries to find a MessageDigest implementation for this AlgorithmIdentifier supported
by the given provider.
|
java.security.MessageDigest |
getMessageDigestInstance(java.lang.String provider)
Tries to find a provider-specific 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 implementation 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.security.Provider provider)
Tries to find a SecretKeyFactory implementation for this AlgorithmIdentifier supported
by the given provider.
|
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.security.Provider provider)
Tries to find a Signature implementation for this AlgorithmIdentifier supported
by the given provider.
|
java.security.Signature |
getSignatureInstance(java.lang.String provider)
Tries to find a provider-specific Signature implementation for this
AlgorithmIdentifier.
|
int |
hashCode()
Returns a hash code value for this object.
|
boolean |
hasParameters()
Asks whether this AlgorithmID has parameters that are different from ASN.1
NULL.
|
static void |
register(java.lang.String objectID,
java.lang.String name,
java.lang.String implementationName)
Registers an AlgorithmID for the given object identifier, a name and and
implementation name.
|
void |
setAlgorithmParameters(java.security.AlgorithmParameters parameters)
Sets the parameters of the algorithm.
|
void |
setAlgorithmParameterSpec(java.security.spec.AlgorithmParameterSpec parameters)
Sets the parameters of the algorithm.
|
void |
setAlgorithmParameterSpec(java.security.spec.AlgorithmParameterSpec parameters,
java.security.Provider provider)
Sets the parameters of the algorithm.
|
void |
setAlgorithmParameterSpec(java.security.spec.AlgorithmParameterSpec parameters,
java.lang.String provider)
Sets the parameters of the algorithm.
|
static void |
setDefaultEncodeAbsentParametersAsNull(boolean useNULLForAbsentParameters)
Sets the default strategy for encoding absent parameters as ASN.1
NULL
or omit the parameters field. |
static void |
setDoIncludeParameters(AlgorithmID pkixSignatureAlgID)
Unregisters a signature AlgorithmID which should contain parameters when
used in PKIX certificate, crl, etc.
|
static void |
setDoNotIncludeParameters(AlgorithmID pkixSignatureAlgID)
Registers a signature AlgorithmID which should not contain parameters when
used in PKIX certificate, crl, etc.
|
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.
|
java.lang.String |
toString()
Returns a string that represents this AlgorithmIdentifier.
|
protected static final java.util.Hashtable algorithms
public static final AlgorithmID rsa
RSA
public key algorithm.
public static final AlgorithmID elGamal
public static final AlgorithmID rc2_CBC
RC2
[TM] symmetric block cipher
used in CBC mode.
public static final AlgorithmID arcfour
ARCFOUR
stream cipher.
public static final AlgorithmID rc4
RC4
[TM] stream cipher.
public static final AlgorithmID des_EDE3_CBC
Triple DES
symmetric block
cipher used in CBC mode.
public static final AlgorithmID des_CBC
DES
symmetric block cipher used
in CBC mode.
public static final AlgorithmID idea_CBC
IDEA
symmetric block cipher
used in CBC mode.
public static final AlgorithmID aes128_CBC
public static final AlgorithmID aes192_CBC
public static final AlgorithmID aes256_CBC
public static final AlgorithmID camellia128_CBC
public static final AlgorithmID camellia192_CBC
public static final AlgorithmID camellia256_CBC
public static final AlgorithmID cast5_CBC
CAST5
symmetric block cipher
used in CBC mode.
public static final AlgorithmID rc5_CBC
RC5
[TM] symmetric block cipher
used in CBC mode.
public static final AlgorithmID aes128_CCM
public static final AlgorithmID aes192_CCM
public static final AlgorithmID aes256_CCM
public static final AlgorithmID aes128_GCM
public static final AlgorithmID aes192_GCM
public static final AlgorithmID aes256_GCM
public static final AlgorithmID aes_CBC_CMAC_128
public static final AlgorithmID aes_CBC_CMAC_192
public static final AlgorithmID aes_CBC_CMAC_256
public static final AlgorithmID chacha20Poly1305
public static final AlgorithmID dhKeyAgreement
Diffie-Hellman
key exchange
algorithm.
public static final AlgorithmID esdhKeyAgreement
Ephemeral-Static Diffie-Hellman
key agreement algorithm (RFC 2631).
public static final AlgorithmID esdh
Ephemeral-Static
Diffie-Hellman
keys.
public static final AlgorithmID ssdhKeyAgreement
Static-Static Diffie-Hellman
key agreement algorithm (CMS).
public static final AlgorithmID rsaEncryption
RSA encryption
signature
algorithm.
public static final AlgorithmID md2WithRSAEncryption
md2WithRSAEncryption
signature
algorithm.
public static final AlgorithmID md4WithRSAEncryption
md4WithRSAEncryption
signature
algorithm.
public static final AlgorithmID md5WithRSAEncryption
md5WithRSAEncryption
signature
algorithm.
public static final AlgorithmID sha1WithRSAEncryption_
sha1WithRSAEncryption
signature algorithm.
public static final AlgorithmID sha1WithRSAEncryption
sha1WithRSAEncryption
signature
algorithm.
public static final AlgorithmID sha224WithRSAEncryption
sha224WithRSAEncryption
signature algorithm (PKCS#1v2).
public static final AlgorithmID sha256WithRSAEncryption
sha256WithRSAEncryption
signature algorithm (PKCS#1v2).
public static final AlgorithmID sha384WithRSAEncryption
sha384WithRSAEncryption
signature algorithm (PKCS#1v2).
public static final AlgorithmID sha512WithRSAEncryption
sha512WithRSAEncryption
signature algorithm (PKCS#1v2).
public static final AlgorithmID sha512_224WithRSAEncryption
sha512-224WithRSAEncryption
signature algorithm (PKCS#1v2).
public static final AlgorithmID sha512_256WithRSAEncryption
sha512-256WithRSAEncryption
signature algorithm (PKCS#1v2).
public static final AlgorithmID sha3_224WithRSAEncryption
sha3-224WithRSAEncryption
signature algorithm (PKCS#1v2).
public static final AlgorithmID sha3_256WithRSAEncryption
sha3-256WithRSAEncryption
signature algorithm (PKCS#1v2).
public static final AlgorithmID sha3_384WithRSAEncryption
sha3-384WithRSAEncryption
signature algorithm (PKCS#1v2).
public static final AlgorithmID sha3_512WithRSAEncryption
sha3-512WithRSAEncryption
signature algorithm (PKCS#1v2).
public static final AlgorithmID dsa_
DSA
algorithm (used
with key factories).
public static final AlgorithmID dsa
DSA
algorithm (used with
KeyFactories).
public static final AlgorithmID dsa_With_SHA1
dsaWithSHA1
(1.2.840.10040.4.3)dsaWithSHA1
signature algorithm.
Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)
public static final AlgorithmID dsaWithSHA
dsaWithSHA
signature algorithm
(addresses the same Signature engine as dsaWithSHA1).
Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)
public static final AlgorithmID dsaWithSHA1
dsaWithSHA
signature algorithm
(addresses the same Signature engine as dsaWithSHA1).
Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)
public static final AlgorithmID dsaWithSHA1_
dsaWithSHA1
(1.2.840.10040.4.3)dsaWithSHA1
signature
algorithm.
Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)
public static final AlgorithmID dsaWithSHA224
dsaWithSHA224
signature
algorithm.
Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)
public static final AlgorithmID dsaWithSHA256
dsaWithSHA256
signature
algorithm.
Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)
public static final AlgorithmID dsaWithSHA384
dsaWithSHA384
signature
algorithm.
Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)
public static final AlgorithmID dsaWithSHA512
dsaWithSHA512
signature
algorithm.
Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)
public static final AlgorithmID dsaWithSHA3_224
dsaWithSHA3-224
signature
algorithm.
Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)
public static final AlgorithmID dsaWithSHA3_256
dsaWithSHA3-256
signature
algorithm.
Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)
public static final AlgorithmID dsaWithSHA3_384
dsaWithSHA3-384
signature
algorithm.
Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)
public static final AlgorithmID dsaWithSHA3_512
dsaWithSHA3-512
signature
algorithm.
Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)
public static final AlgorithmID rsaKem
RSA
Key Encapsulation Mechanism.
public static final AlgorithmID kdf1
KDF1
defined in ISO18033-2.
public static final AlgorithmID kdf2
KDF2
defined in ANS X9.44.
public static final AlgorithmID kdf3
KDF3
defined in ANS X9.44.
public static final AlgorithmID ecdsa
ECDSA
algorithm (used with key
factories).
public static final AlgorithmID ecPublicKey
id-ecPublicKey
algorithm (RFC
5480, used with key factories).
public static final AlgorithmID ecDH
id-ecDH
public key algorithm
(RFC 5480, used with key factories).
public static final AlgorithmID dhSinglePass_stdDH_sha1kdf_scheme
dhSinglePass-stdDH-sha1kdf-scheme
key encryption algorithm for using the standard ECDH primitive with ASNI-X9.63-KDF
key derivation function with hash algorithm SHA-1.
public static final AlgorithmID dhSinglePass_stdDH_sha224kdf_scheme
dhSinglePass-stdDH-sha224kdf-scheme
key encryption algorithm specified by SEC1 and RFC 5753 for using the standard
ECDH primitive with ASNI-X9.63-KDF key derivation function with hash algorithm SHA-224.
public static final AlgorithmID dhSinglePass_stdDH_sha256kdf_scheme
dhSinglePass-stdDH-sha256kdf-scheme
key encryption algorithm (SEC1, RFC 5753) for using the standard ECDH primitive with ASNI-X9.63-KDF
key derivation function with hash algorithm SHA-256.
public static final AlgorithmID dhSinglePass_stdDH_sha384kdf_scheme
dhSinglePass-stdDH-sha384kdf-scheme
key encryption algorithm (SEC1, RFC 5753) for using the standard ECDH primitive with ASNI-X9.63-KDF
key derivation function with hash algorithm SHA-384.
public static final AlgorithmID dhSinglePass_stdDH_sha512kdf_scheme
dhSinglePass-stdDH-sha512kdf-scheme
key encryption algorithm specified by SEC1 and RFC 5753 for using the standard ECDH primitive
with ASNI-X9.63-KDF key derivation function with hash algorithm SHA-512.
public static final AlgorithmID dhSinglePass_cofactorDH_sha1kdf_scheme
dhSinglePass-cofactorDH-sha1kdf-scheme
key encryption algorithm for using the cofactor ECDH primitive with ASNI-X9.63-KDF
key derivation function with hash algorithm SHA-1.
public static final AlgorithmID dhSinglePass_cofactorDH_sha224kdf_scheme
dhSinglePass-cofactorDH-sha224kdf-scheme
key encryption algorithm specified by SEC1 and RFC 5753 for using the cofactor ECDH primitive with
ASNI-X9.63-KDF key derivation function with hash algorithm SHA-224.
public static final AlgorithmID dhSinglePass_cofactorDH_sha256kdf_scheme
dhSinglePass-cofactorDH-sha256kdf-scheme
key encryption algorithm specified by SEC1 and RFC 5753 for using the cofactor ECDH primitive with
ASNI-X9.63-KDF key derivation function with hash algorithm SHA-256.
public static final AlgorithmID dhSinglePass_cofactorDH_sha384kdf_scheme
dhSinglePass-cofactorDH-sha384kdf-scheme
key encryption algorithm specified by SEC1 and RFC 5753 for using the cofactor ECDH primitive with
ASNI-X9.63-KDF key derivation function with hash algorithm SHA-384.
public static final AlgorithmID dhSinglePass_cofactorDH_sha512kdf_scheme
dhSinglePass-cofactorDH-sha512kdf-scheme
key encryption algorithm specified by SEC1 and RFC 5753 for using the cofactor ECDH primitive with
ASNI-X9.63-KDF key derivation function with hash algorithm SHA-512.
public static final AlgorithmID dhSinglePass_stdDH_hkdf_sha256_scheme
dhSinglePass-stdDH-hkdf-sha256-scheme
key encryption algorithm for using the standard ECDH primitive with the HKDF
key derivation function (RFC 5869) with hash algorithm SHA-256.
public static final AlgorithmID dhSinglePass_stdDH_hkdf_sha384_scheme
dhSinglePass-stdDH-hkdf-sha384-scheme
key encryption algorithm for using the standard ECDH primitive with the HKDF
key derivation function (RFC 5869) with hash algorithm SHA-384.
public static final AlgorithmID dhSinglePass_stdDH_hkdf_sha512_scheme
dhSinglePass-stdDH-hkdf-sha512-scheme
key encryption algorithm for using the standard ECDH primitive with the HKDF
key derivation function (RFC 5869) with hash algorithm SHA-512.
public static final AlgorithmID ecka_eg_X963KDF_SHA256
public static final AlgorithmID ecka_eg_X963KDF_SHA384
public static final AlgorithmID ecka_eg_X963KDF_SHA512
public static final AlgorithmID x25519
public static final AlgorithmID x448
public static final AlgorithmID ed25519
public static final AlgorithmID ed448
public static final AlgorithmID hkdf_with_SHA256
public static final AlgorithmID hkdf_with_SHA384
public static final AlgorithmID hkdf_with_SHA512
public static final AlgorithmID x9_63_kdf
public static final AlgorithmID gost3410
gostR3410-2001
signature
algorithm as specified by RFC 5832.
Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)
public static final AlgorithmID ecdsa_With_SHA1
ecdsa-with-SHA1
signature
algorithm as specified by ANSI X9.62.
Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)
public static final AlgorithmID ecdsa_With_SHA224
ecdsa-with-SHA224
signature
algorithm as specified by ANSI X9.62:2005.
Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)
public static final AlgorithmID ecdsa_With_SHA256
ecdsa-with-SHA256
signature
algorithm as specified by ANSI X9.62:2005.
Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)
public static final AlgorithmID ecdsa_With_SHA384
ecdsa-with-SHA384
signature
algorithm as specified by ANSI X9.62:2005.
Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)
public static final AlgorithmID ecdsa_With_SHA512
ecdsa-with-SHA512
signature
algorithm as specified by ANSI X9.62:2005.
Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)
public static final AlgorithmID ecdsa_With_SHA3_224
ecdsa-with-SHA3-224
signature
algorithm as specified by ANSI ANSI X9.62:2005.
Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)
public static final AlgorithmID ecdsa_With_SHA3_256
ecdsa-with-SHA3-256
signature
algorithm as specified by ANSI ANSI X9.62:2005.
Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)
public static final AlgorithmID ecdsa_With_SHA3_384
ecdsa-with-SHA3-384
signature
algorithm as specified by ANSI ANSI X9.62:2005.
Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)
public static final AlgorithmID ecdsa_With_SHA3_512
ecdsa-with-SHA3-512
signature
algorithm as specified by ANSI ANSI X9.62:2005.
Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)
public static final AlgorithmID ecdsa_plain_With_SHA1
ecdsa-plain-SHA1
signature
algorithm as defined by the German BSI Technical Guideline TR-03111. The
signature value is encoded as (r || s) and not wrapped into a SEQUENCE as
done by X9.62. If the hash length is larger than the domain parameter
length the hash is not truncated like in X9.62; rather it is reduced modulo
n, the order of the base point G.
Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)
public static final AlgorithmID ecdsa_plain_With_SHA224
ecdsa-plain-SHA224
signature
algorithm as defined by the German BSI Technical Guideline TR-03111. The
signature value is encoded as (r || s) and not wrapped into a SEQUENCE as
done by X9.62. If the hash length is larger than the domain parameter
length the hash is not truncated like in X9.62; rather it is reduced modulo
n, the order of the base point G.
Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)
public static final AlgorithmID ecdsa_plain_With_SHA256
ecdsa-plain-SHA256
signature
algorithm as defined by the German BSI Technical Guideline TR-03111. The
signature value is encoded as (r || s) and not wrapped into a SEQUENCE as
done by X9.62. If the hash length is larger than the domain parameter
length the hash is not truncated like in X9.62; rather it is reduced modulo
n, the order of the base point G.
Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)
public static final AlgorithmID ecdsa_plain_With_SHA384
ecdsa-plain-SHA384
signature
algorithm as defined by the German BSI Technical Guideline TR-03111. The
signature value is encoded as (r || s) and not wrapped into a SEQUENCE as
done by X9.62. If the hash length is larger than the domain parameter
length the hash is not truncated like in X9.62; rather it is reduced modulo
n, the order of the base point G.
Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)
public static final AlgorithmID ecdsa_plain_With_SHA512
ecdsa-plain-SHA512
signature
algorithm as defined by the German BSI Technical Guideline TR-03111. The
signature value is encoded as (r || s) and not wrapped into a SEQUENCE as
done by X9.62. If the hash length is larger than the domain parameter
length the hash is not truncated like in X9.62; rather it is reduced modulo
n, the order of the base point G.
Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)
public static final AlgorithmID ecdsa_plain_With_RIPEMD160
ecdsa-plain-RIPEMD160
signature
algorithm as defined by the German BSI Technical Guideline TR-03111. The
signature value is encoded as (r || s) and not wrapped into a SEQUENCE as
done by X9.62. If the hash length is larger than the domain parameter
length the hash is not truncated like in X9.62; rather it is reduced modulo
n, the order of the base point G.
Note that the parameters field is omitted from the encoding if no parameters are set (i.e. absent parameters are NOT encoded as NULL!)
public static final AlgorithmID rsaSignatureWithRipemd160
rsaSignatureWithRipemd160
signature algorithm.
public static final AlgorithmID rsaSignatureWithRipemd128
rsaSignatureWithRipemd128
signature algorithm.
public static final AlgorithmID rsaSignatureWithRipemd256
rsaSignatureWithRipemd256
signature algorithm.
public static final AlgorithmID sigS_ISO9796_2Withrsa
sigS_ISO9796_2Withrsa
signature algorithm (RSA based ISO/IEC 9796-2 scheme S2, S3).
public static final AlgorithmID sigS_ISO9796_2Withsha1
sigS_ISO9796_2Withsha1
signature algorithm (RSA based ISO/IEC 9796-2 scheme using SHA-1 as hash
algorithm and "BC" as trailer field).
public static final AlgorithmID sigS_ISO9796_2Withripemd160
sigS_ISO9796_2Withripemd160
signature algorithm (RSA based
ISO/IEC 9796-2 scheme using RIPEMD-160 as hash algorithm and "BC"
as trailer field).
public static final AlgorithmID sigS_ISO9796_2rndWithrsa
sigS_ISO9796_2Withrsa
signature algorithm (RSA based ISO/IEC 9796-2 scheme S2, S3 with random
number).
public static final AlgorithmID sigS_ISO9796_2rndWithsha1
sigS_ISO9796_2Withsha1
signature algorithm (RSA based ISO/IEC 9796-2 scheme with random number
using SHA-1 as hash algorithm and "BC" as trailer field).
public static final AlgorithmID sigS_ISO9796_2rndWithripemd160
sigS_ISO9796_2Withripemd160
signature algorithm (RSA based
ISO/IEC 9796-2 scheme with random number using RIPEMD-160 as hash algorithm
and "BC" as trailer field).
public static final AlgorithmID mgf1
MGF1
mask generation
function.
public static final AlgorithmID pbeWithMD5AndDES_CBC
pbeWithMD5AndDES_CBC
key-encryption algorithm as defined by PKCS#5.
public static final AlgorithmID pbeWithSHAAnd128BitRC4
pbeWithSHAAnd128BitRC4
key-encryption algorithm as defined by PKCS#12.
public static final AlgorithmID pbeWithSHAAnd40BitRC4
pbeWithSHAAnd40BitRC4
key-encryption algorithm as defined by PKCS#12.
public static final AlgorithmID pbeWithSHAAnd3_KeyTripleDES_CBC
pbeWithSHAAnd3_KeyTripleDES_CBC
key-encryption algorithm as defined by PKCS#12.
public static final AlgorithmID pbeWithSHAAnd2_KeyTripleDES_CBC
pbeWithSHAAnd2_KeyTripleDES_CBC
key-encryption algorithm as defined by PKCS#12.
public static final AlgorithmID pbeWithSHAAnd128BitRC2_CBC
pbeWithSHAAnd128BitRC2_CBC
key-encryption algorithm as defined by PKCS#12.
public static final AlgorithmID pbeWithSHAAnd40BitRC2_CBC
pbeWithSHAAnd40BitRC2_CBC
key-encryption algorithm as defined by PKCS#12.
public static final AlgorithmID pbkdf2
PBKDF2
key-derivation function
as defined by PKCS#5 (key generator).
public static final AlgorithmID pbes2
PBES2
encryption scheme
as defined by PKCS#5, 2.0 (cipher).
public static final AlgorithmID pSpecified
pSpecified
PSourceAlgorithm.
public static final AlgorithmID md2
MD2
message digest algorithm.
public static final AlgorithmID md4
MD4
message digest algorithm.
public static final AlgorithmID md5
MD5
message digest algorithm.
public static final AlgorithmID sha
SHA
message digest algorithm.
public static final AlgorithmID sha1
SHA1
message digest algorithm
which is the same as SHA
.
public static final AlgorithmID gost3411
GOST-R-34.11-94
message digest
algorithm which is the same as GOST3411
.
public static final AlgorithmID sha256
SHA-256
message digest
algorithm.
public static final AlgorithmID sha224
SHA-224
message digest
algorithm.
public static final AlgorithmID sha384
SHA-384
message digest
algorithm.
public static final AlgorithmID sha512
SHA-512
message digest
algorithm.
public static final AlgorithmID sha512_224
SHA-512/224
message digest
algorithm.
public static final AlgorithmID sha512_256
SHA-512/256
message digest
algorithm.
public static final AlgorithmID sha3_224
SHA3-224
message digest
algorithm as specified by NIST FIPS PUB 202.
public static final AlgorithmID sha3_256
SHA3-256
message digest
algorithm as specified by NIST FIPS PUB 202.
public static final AlgorithmID sha3_384
SHA3-384
message digest
algorithm as specified by NIST FIPS PUB 202.
public static final AlgorithmID sha3_512
SHA3-512
message digest
algorithm as specified by NIST FIPS PUB 202.
public static final AlgorithmID shake128
SHAKE128
Extendable Output
Function (XOF) as specified by NIST FIPS PUB 202.
public static final AlgorithmID shake256
SHAKE256
Extendable Output
Function (XOF) as specified by NIST FIPS PUB 202.
public static final AlgorithmID shake128Len
SHAKE128
Extendable Output
Function (XOF) as specified by NIST FIPS PUB 202 when used with output length
parameter; see NIST algorithm identifier registration at
Computer Security Objects Register.
public static final AlgorithmID shake256Len
SHAKE256
Extendable Output
Function (XOF) as specified by NIST FIPS PUB 202 when used with output length
parameter; see NIST algorithm identifier registration at
Computer Security Objects Register.
public static final AlgorithmID ripeMd160_ISO
RipeMd160
message digest
algorithm. Defined by ISO/IEC 10118.
public static final AlgorithmID ripeMd128_ISO
RipeMd128
message digest
algorithm. Defined by ISO/IEC 10118.
public static final AlgorithmID ripeMd160
RipeMd160
message digest
algorithm. Defined by TeleTrust.
public static final AlgorithmID ripeMd128
RipeMd128
message digest
algorithm. Defined by TeleTrust.
public static final AlgorithmID ripeMd256
RipeMd256
message digest
algorithm. Defined by TeleTrust.
public static final AlgorithmID whirlpool
Whirlpool
message digest
algorithm.
public static final AlgorithmID hMAC_GOST
HMAC_GOSTR3411
message authentication
algorithm.
public static final AlgorithmID hMAC_MD5
hMAC-SHA1
message authentication
algorithm.
public static final AlgorithmID hMAC_SHA1_
hMAC-SHA1
message authentication algorithm.
public static final AlgorithmID hMAC_SHA1
hMAC-SHA1
message authentication
algorithm.
public static final AlgorithmID hMAC_SHA224
hMAC-SHA224
message authentication
algorithm (RFC 4231).
public static final AlgorithmID hMAC_SHA256
hMAC-SHA256
message authentication
algorithm (RFC 4231).
public static final AlgorithmID hMAC_SHA384
hMAC-SHA384
message authentication
algorithm (RFC 4231).
public static final AlgorithmID hMAC_SHA512
hMAC-SHA512
message authentication
algorithm (RFC 4231).
public static final AlgorithmID hMAC_SHA3_224
hMAC-SHA3-224
message authentication
algorithm.
public static final AlgorithmID hMAC_SHA3_256
hMAC-SHA3-256
message authentication
algorithm.
public static final AlgorithmID hMAC_SHA3_384
hMAC-SHA3-384
message authentication
algorithm.
public static final AlgorithmID hMAC_SHA3_512
hMAC-SHA3-512
message authentication
algorithm.
public static final AlgorithmID hMAC_RIPEMD160
hMAC-RIPEMD160
message digest
algorithm.
public static final AlgorithmID cms_3DES_wrap
CMS3DESwrap
key wrap algorithm
for wrapping 3DES content encryption keys with 3DES key encryption keys
(RFC 2630).
public static final AlgorithmID cms_rc2_wrap
CMSRC2wrap
key wrap algorithm
for wrapping RC2 content encryption keys with RC2 key encryption keys (RFC
2630).
public static final AlgorithmID cms_idea_wrap
CMSIDEAwrap
key wrap algorithm
for wrapping IDEA content encryption keys with IDEA key encryption keys
(RFC 3058).
public static final AlgorithmID cms_cast5_wrap
CMSCAST128wrap
key wrap
algorithm for wrapping CAST128 content encryption keys with CAST128 key
encryption keys (RFC 2984).
public static final AlgorithmID cms_aes128_wrap
CMSAESwrap
key wrap algorithm
using a 128 bit AES key as key encryption key (RFC 3394).
public static final AlgorithmID cms_aes192_wrap
CMSAESwrap
key wrap algorithm
using a 192 bit AES key as key encryption key (RFC 3394).
public static final AlgorithmID cms_aes256_wrap
CMSAESwrap
key wrap algorithm
using a 256 AES key as key encryption key (RFC 3394).
public static final AlgorithmID aes128_wrap_pad
public static final AlgorithmID aes192_wrap_pad
public static final AlgorithmID aes256_wrap_pad
public static final AlgorithmID cms_camellia128_wrap
CMSCamelliaWrap
key wrap
algorithm using a 128 bit Camellia key as key encryption key (RFC 3657).
public static final AlgorithmID cms_camellia192_wrap
CMSCamelliaWrap
key wrap
algorithm using a 192 bit Camellia key as key encryption key (RFC 3657).
public static final AlgorithmID cms_camellia256_wrap
CMSCamelliaWrap
key wrap
algorithm using a 256 Camellia key as key encryption key (RFC 3657).
public static final AlgorithmID cms_HMACwith3DES_wrap
HMACwith3DESwrap
key wrap
algorithm for wrapping a HMAC key with a 3DES key encryption key (RFC
3537).
public static final AlgorithmID cms_HMACwithAES_wrap
HMACwithAESwrap
key wrap
algorithm for wrapping a HMAC key with a AES key encryption key (RFC 3537).
public static final AlgorithmID pwri_kek
public static final AlgorithmID zlib_compress
ZLIB compression
algorithm
([RFC1950] [RFC1951]).
public static final AlgorithmID rsaesOAEP
RSAES-OAEP
encryption scheme.
public static final AlgorithmID rsassaPss
RSASSA-PSS
signature
algorithm.
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.
"2.16.840.1.101.3.4.1.2"name
- the name for this object identifier; e.g "AES128-CBC"implementationName
- the internal implementation name; e.g. "AES/CBC/PKCS5Padding"public AlgorithmID(java.lang.String objectID, java.lang.String name, java.lang.String implementationName, java.lang.Class algorithmParameterSpec)
In addition to constructor AlgorithmID(String, String, String)
,
this one accepts an AlgorithmParameterSpec
class. The method
getAlgorithmParameterSpec(String)
uses this class as return value.
Please note that the implementation name of this AlgorithmID must match a
name of an AlgorithmParameters implementation.
objectID
- the object identifier of the algorithm as a string; e.g.
"2.16.840.1.101.3.4.1.2"name
- the name for this object identifier; e.g "AES128-CBC"implementationName
- the internal implementation name; e.g. "AES/CBC/PKCS5Padding"algorithmParameterSpec
- The preferred AlgorithmParameterSpec class to use in
getAlgorithmParameterSpec(String)
; e.g.
javax.crypto.spec.IvParameterSpec
. May be
null
.public AlgorithmID(java.lang.String objectID, java.lang.String name, java.lang.String implementationName, 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. To decide whether absent
parameters shall be encoded as ASN.1 NULL object or shall be omitted from
the encoding at all, set parameter useNULLForAbsentParameters
to true
or false
. 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.
objectID
- the object identifier of the algorithm as a string; e.g.
"2.16.840.1.101.3.4.1.2"name
- the name for this object identifier; e.g "AES128-CBC"implementationName
- the internal implementation name; e.g. "AES/CBC/PKCS5Padding"useNULLForAbsentParameters
- true
if absent parameters shall be encoded as NULL,
false
if absent parameters shall be omitted from the
encodingpublic AlgorithmID(java.lang.String objectID, java.lang.String name, java.lang.String implementationName, java.lang.Class algorithmParameterSpec, boolean useNULLForAbsentParameters)
This constructor is only for internal use (private); it does not check the objectOD string for correct syntax.
In addition to constructor AlgorithmID(String, String, String)
,
this one accepts an AlgorithmParameterSpec
class. The method
getAlgorithmParameterSpec(String)
uses this class as return value.
Please note that the implementation name of this AlgorithmID must match a
name of an AlgorithmParameters implementation.
objectID
- the object identifier of the algorithm as a string; e.g.
"2.16.840.1.101.3.4.1.2"name
- the name for this object identifier; e.g "AES128-CBC"implementationName
- the internal implementation name; e.g. "AES/CBC/PKCS5Padding"algorithmParameterSpec
- The preferred AlgorithmParameterSpec class to use in
getAlgorithmParameterSpec(String)
; e.g.
javax.crypto.spec.IvParameterSpec
. May be
null
.useNULLForAbsentParameters
- true
if absent parameters shall be encoded as NULL,
false
if absent parameters shall be omitted from the
encodingjava.lang.IllegalArgumentException
- if the given algorithmParameterSpec
class is invalid (does not implement the
AlgorithmParameterSpec
interface)public AlgorithmID(java.lang.String objectID, java.lang.String name, java.lang.String[] implementationNames, boolean useNULLForAbsentParameters)
This constructor allows to specify more than only one implementation
names (e.g. { "SHA1", "SHA-1", "SHA"). The first name in the array is
used as "default" implementation name, it will be returned
when calling
.
The other names may be used when algorithmID.getImplementationName
searching
for a particular AlgorithmID based on an implementation name:
AlgorithmID.getAlgorithmID(implementationName)
; .
objectID
- the object identifier of the algorithm as a string; e.g.
"1.3.14.3.2.26"name
- the name for this object identifier; e.g "SHA1"implementationNames
- the implementation names; e.g. { "SHA1", "SHA-1", "SHA" }useNULLForAbsentParameters
- true
if absent parameters shall be encoded as NULL,
false
if absent parameters shall be omitted from the
encodingpublic AlgorithmID(java.lang.String objectID, java.lang.String name, java.lang.String[] implementationNames, java.lang.Class algorithmParameterSpec)
This constructor is only for internal use (private); it does not check the objectOD string for correct syntax.
In addition to constructor AlgorithmID(String, String, String)
,
this one accepts an AlgorithmParameterSpec
class. The method
getAlgorithmParameterSpec(String)
uses this class as return value.
Please note that the implementation name of this AlgorithmID must match a
name of an AlgorithmParameters implementation.
This constructor allows to specify more than only one implementation
names (e.g. { "SHA1", "SHA-1", "SHA"). The first name in the array is
used as "default" implementation name, it will be returned
when calling
.
The other names may be used when algorithmID.getImplementationName
searching
for a particular AlgorithmID based on an implementation name:
AlgorithmID.getAlgorithmID(implementationName)
; .
objectID
- the object identifier of the algorithm as a string; e.g.
"2.16.840.1.101.3.4.1.2"name
- the name for this object identifier; e.g "AES128-CBC"implementationNames
- the implementation names; e.g. { "AES/CBC/PKCS5Padding", "AES128/CBC/PKCS5Padding" }algorithmParameterSpec
- The preferred AlgorithmParameterSpec class to use in
getAlgorithmParameterSpec(String)
; e.g.
javax.crypto.spec.IvParameterSpec
. May be
null
.java.lang.IllegalArgumentException
- if the given algorithmParameterSpec
class is invalid (does not implement the
AlgorithmParameterSpec
interface)public AlgorithmID(java.lang.String objectID, java.lang.String name, java.lang.String[] implementationNames, java.lang.Class algorithmParameterSpec, boolean useNULLForAbsentParameters)
This constructor is only for internal use (private); it does not check the objectOD string for correct syntax.
In addition to constructor AlgorithmID(String, String, String)
,
this one accepts an AlgorithmParameterSpec
class. The method
getAlgorithmParameterSpec(String)
uses this class as return value.
Please note that the implementation name of this AlgorithmID must match a
name of an AlgorithmParameters implementation.
This constructor allows to specify more than only one implementation
names (e.g. { "SHA1", "SHA-1", "SHA"). The first name in the array is
used as "default" implementation name, it will be returned
when calling
.
The other names may be used when algorithmID.getImplementationName
searching
for a particular AlgorithmID based on an implementation name:
AlgorithmID.getAlgorithmID(implementationName)
; .
objectID
- the object identifier of the algorithm as a string; e.g.
"2.16.840.1.101.3.4.1.2"name
- the name for this object identifier; e.g "AES128-CBC"implementationNames
- the implementation names; e.g. { "AES/CBC/PKCS5Padding", "AES128/CBC/PKCS5Padding" }algorithmParameterSpec
- The preferred AlgorithmParameterSpec class to use in
getAlgorithmParameterSpec(String)
; e.g.
javax.crypto.spec.IvParameterSpec
. May be
null
.useNULLForAbsentParameters
- true
if absent parameters shall be encoded as NULL,
false
if absent parameters shall be omitted from the
encodingjava.lang.IllegalArgumentException
- if the given algorithmParameterSpec
class is invalid (does not implement the
AlgorithmParameterSpec
interface)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 DerInputStream
supplies DER
encoded data that represents an already existing AlgorithmID.
is
- the DerInputStream supplying the DER encoded ASN1Objectjava.io.IOException
- if an I/O or decoding error occurspublic static void setDefaultEncodeAbsentParametersAsNull(boolean useNULLForAbsentParameters)
NULL
or omit the parameters
field.
Algorithms (e.g. SHA1) that do not use any parameters may encode their parameters
field as ASN.1 NULL
or may omit the parameters
field entirely from
the encoding:
AlgorithmIdentifier ::= SEQUENCE { algorithm OBJECT IDENTIFIER, parameters ANY DEFINED BY algorithm OPTIONAL }By default absent parameters are encoded as ASN.1
NULL
. Use this
method if you want to change the default behaviour to omit the parameters
field from the encoding:
AlgorithmID.setDefaultEncodeAbsentParametersAsNull(false);
useNULLForAbsentParameters
- true
if absent parameters shall be encoded as NULL,
false
if absent parameters shall be omitted from the
encodingpublic static boolean getDoNotIncludeParameters(AlgorithmID pkixSignatureAlgID)
sign
method of any of the PKCS
X.509 related objects listed below, IAIK-JCE by default includes parameters
in the signature AlgorithmID (if parameters are created by the Signature
engine that is used for calculating the signature), except for DSA and
ECDSA algorithms (including key algorithm ids that may not be used as signature ids).
You can use method setDoNotIncludeParameters
to register any further AlgorithmID for which
you do not want to have parameters included when used with the
sign
method of any of the following PKIX related classes:
pkixSignatureAlgID
- the PKIX Signature AlgorithmID to be checked if parameters shall
be not included when used in a PKIX X.509 certificate, crl, etc.true
if no parameters shall be included
false
if parameters shall be includedpublic static void setDoNotIncludeParameters(AlgorithmID pkixSignatureAlgID)
sign
method of any of the PKCS
X.509 related objects listed below, IAIK-JCE by default includes parameters
in the signature AlgorithmID (if parameters are created by the Signature
engine that is used for calculating the signature), except for DSA and
ECDSA algorithms (including key algorithm ids that may not be used as signature ids).
You can use this setDoNotIncludeParameters
method to register
any further AlgorithmID for which you do not want to have parameters
included when used with the sign
method of any of the
following PKIX related classes:
pkixSignatureAlgID
- the PKIX Signature AlgorithmID that shall not contain parameters
when used in a PKIX X.509 certificate, crl, etc.public static void setDoIncludeParameters(AlgorithmID pkixSignatureAlgID)
registered
to
not contain parameters when used in PKCS certificate, crl, etc. objects.
After calling this method for a specific algorithms parameters will be
included again.pkixSignatureAlgID
- the PKIX Signature AlgorithmID that shall not contain parameters
when used in a PKIX X.509 certificate, crl, etc.public 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 static void register(java.lang.String objectID, java.lang.String name, java.lang.String implementationName)
AlgorithmID.register("1.3.14.3.2.12", "DSA", "DSA");as alternative to:
new AlgorithmID("1.3.14.3.2.12", "DSA", "DSA");
objectID
- the object identifier of the algorithm as a string; e.g.
"2.16.840.1.101.3.4.1.2"name
- the name for this object identifier; e.g "AES128-CBC"implementationName
- the internal implementation name; e.g. "AES/CBC/PKCS5Padding"public static AlgorithmID getAlgorithmID(java.lang.String implementationName)
This method may be used to search for an AlgorithmID when the implementation name is known. To get, for instance, an AlgorithmID for "3DES/CBC/PKCS5Padding" just try:
AlgorithmID algID = AlgorithmID.getAlgorithmID("3DES/CBC/PKCS5Padding"); if (algID != null) { ... }
implementationName
- the implementation name (e.g. "3DES/CBC/PKCS5Padding") for which a
AlgorithmID shall be searchednull
if no AlgorithmID for this implementation name is
registeredpublic static java.lang.String[] getImplementationNames(AlgorithmID algorithmID)
algorithmID
- the AlgorithmID for which to get the registered implementation namespublic 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 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 ASN1Type
algorithmID
- the AlgorithmID as ASN1ObjectCodingException
- if the ASN1Object is no AlgorithmIDpublic ASN1Object toASN1Object()
toASN1Object
in interface ASN1Type
SEQUENCE
public ASN1Object toASN1Object(boolean useNULLForAbsentParameters)
useNULLForAbsentParameters
- whether to encode absent parameters as NULL or omit the parameters
componentpublic java.lang.String getImplementationName() throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException
- if there is no name for the implementationpublic java.lang.String getJcaStandardName() throws java.security.NoSuchAlgorithmException
Since JCA standard algorithm names have been changed over time a JCA standard
algorithm name may be different to the implementation name
for the same algorithm id. For backwards compatibility method implementation name
continues to return the
implementation name used by IAIK-JCE so far, whereas this method
returns the algorithm name defined by the JCA specification.
For the RSA-PSS signature algorithm the JCA standard name is derived from the
algorithm id parameters. Since there is only one AlgorithmID
specified for RSA-PSS, hash algorithm and mask generation function are given by
the algorithm id parameters.
The JCA uses the <digest>with<RSA>and<mgf> naming scheme for RSA-PSS
where <digest> and <mgf> have to be got from the algorithm id parameters.
Thus the JCA standard name for, e.g., a RSA-PSS algorithm id
using SHA-256 as hash algorithm and MGF1 as mask generation function is
"SHA256withRSAandMGF1". If the parameters cannot be parsed, "RSASSA-PSS" is
returned as (general) signature algorithm name.
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
algorithm
parameter
in in Cipher.getInstance(algorithm)
.java.security.NoSuchAlgorithmException
- if there is no Cipher implementationpublic javax.crypto.Cipher getCipherInstance(java.lang.String provider) throws java.security.NoSuchAlgorithmException
algorithm
parameter in Cipher.getInstance(algorithm, provider)
.provider
- the name of the requested providerjava.security.NoSuchAlgorithmException
- if there is no Cipher implementationpublic javax.crypto.Cipher getCipherInstance(java.security.Provider provider) throws java.security.NoSuchAlgorithmException
This method calls Cipher.getInstance(algorithm,provider) by
substituting implementationName, JCA standard name, OID string and OID name (in that order)
for the algorithm
parameter in Cipher.getInstance(algorithm,provider)
.
If Provider object based JCA/JCE Cipher engine instantiation
is not available the Java VM in use (<1.4), this method tries to get an implementation
based on the provider name (if the Provider is installed within the Security Provider
framework). I.e. if method Cipher.getInstance(algorithm,provider)
is not available method Cipher.getInstance(algorithm,provider.getName())
is tried.
If null
is given as provider
a Cipher implementation of
the first installed Provider that implements this algorithm id is returned
(Cipher.getInstance(algorithm)
.
provider
- the provider from which to get a Cipher engine for this AlgorithmIDjava.security.NoSuchAlgorithmException
- if there is no Cipher implementation available for this AlgorithmiD
from the given provider (or from any installed provider if provider
is null
)public java.security.Signature getSignatureInstance() throws java.security.NoSuchAlgorithmException
algorithm
parameter in
ignature.getInstance(algorithm)
.java.security.NoSuchAlgorithmException
- if there is no Signature implementationpublic java.security.Signature getSignatureInstance(java.lang.String provider) throws java.security.NoSuchAlgorithmException
algorithm
parameter in
Signature.getInstance(algorithm,provider)
.provider
- the name of the requested providerjava.security.NoSuchAlgorithmException
- if there is no Signature implementationpublic java.security.Signature getSignatureInstance(java.security.Provider provider) throws java.security.NoSuchAlgorithmException
This method calls Signature.getInstance(algorithm,provider) by
substituting implementationName, JCA standard name, OID string and OID name (in that order)
for the algorithm
parameter in Signature.getInstance(algorithm,provider)
.
If Provider object based JCA/JCE Signature engine instantiation
is not available the Java VM in use (<1.4), this method tries to get an implementation
based on the provider name (if the Provider is installed within the Security Provider
framework). I.e. if method Signature.getInstance(algorithm,provider)
is not available method Signature.getInstance(algorithm,provider.getName())
is tried.
If null
is given as provider
a Signature implementation of
the first installed Provider that implements this algorithm id is returned
(Signature.getInstance(algorithm)
.
provider
- the provider from which to get a Signature engine for this AlgorithmIDjava.security.NoSuchAlgorithmException
- if there is no Signature implementation available for this AlgorithmiD
from the given provider (or from any installed provider if provider
is null
)public java.security.MessageDigest getMessageDigestInstance() throws java.security.NoSuchAlgorithmException
algorithm
parameter in MessageDigest.getInstance(algorithm)
.java.security.NoSuchAlgorithmException
- if there is no MessageDigest implementationpublic java.security.MessageDigest getMessageDigestInstance(java.lang.String provider) throws java.security.NoSuchAlgorithmException
algorithm
parameter in
MessageDigest.getInstance(algorithm,provider)
.provider
- the name of the requested providerjava.security.NoSuchAlgorithmException
- if there is no MessageDigest implementationpublic java.security.MessageDigest getMessageDigestInstance(java.security.Provider provider) throws java.security.NoSuchAlgorithmException
This method calls MessageDigest.getInstance(algorithm,provider) by
substituting implementationName, JCA standard name, OID string and OID name (in that order)
for the algorithm
parameter in MessageDigest.getInstance(algorithm,provider)
.
If Provider object based JCA/JCE MessageDigest engine instantiation
is not available the Java VM in use (<1.4), this method tries to get an implementation
based on the provider name (if the Provider is installed within the Security Provider
framework). I.e. if method MessageDigest.getInstance(algorithm,provider)
is not available method MessageDigest.getInstance(algorithm,provider.getName())
is tried.
If null
is given as provider
a MessageDigest implementation of
the first installed Provider that implements this algorithm id is returned
(MessageDigest.getInstance(algorithm)
.
provider
- the provider from which to get a MessageDigest engine for this AlgorithmIDjava.security.NoSuchAlgorithmException
- if there is no MessageDigest implementation available for this AlgorithmiD
from the given provider (or from any installed provider if provider
is null
)public javax.crypto.Mac getMacInstance() throws java.security.NoSuchAlgorithmException
algorithm
parameter in Mac.getInstance(algorithm)
.java.security.NoSuchAlgorithmException
- if there is no Mac implementationpublic javax.crypto.Mac getMacInstance(java.lang.String provider) throws java.security.NoSuchAlgorithmException
algorithm
parameter in Mac.getInstance(algorithm,provider)
.provider
- the name of the requested providerjava.security.NoSuchAlgorithmException
- if there is no Mac implementationpublic javax.crypto.Mac getMacInstance(java.security.Provider provider) throws java.security.NoSuchAlgorithmException
This method calls Mac.getInstance(algorithm,provider) by
substituting implementationName, JCA standard name, OID string and OID name (in that order)
for the algorithm
parameter in Mac.getInstance(algorithm,provider)
.
If Provider object based JCA/JCE Mac engine instantiation
is not available the Java VM in use (<1.4), this method tries to get an implementation
based on the provider name (if the Provider is installed within the Security Provider
framework). I.e. if method Mac.getInstance(algorithm,provider)
is not available method Mac.getInstance(algorithm,provider.getName())
is tried.
If null
is given as provider
a Mac implementation of
the first installed Provider that implements this algorithm id is returned
(Mac.getInstance(algorithm)
.
provider
- the provider from which to get a Mac engine for this AlgorithmIDjava.security.NoSuchAlgorithmException
- if there is no Mac implementation available for this AlgorithmiD
from the given provider (or from any installed provider if provider
is null
)public javax.crypto.KeyAgreement getKeyAgreementInstance() throws java.security.NoSuchAlgorithmException
algorithm
parameter in KeyAgreement.getInstance(algorithm)
.java.security.NoSuchAlgorithmException
- if there is no KeyAgreement implementationpublic javax.crypto.KeyAgreement getKeyAgreementInstance(java.lang.String provider) throws java.security.NoSuchAlgorithmException
algorithm
parameter in
KeyAgreement.getInstance(algorithm,provider)
.provider
- the name of the requested providerjava.security.NoSuchAlgorithmException
- if there is no KeyAgreement implementationpublic javax.crypto.KeyAgreement getKeyAgreementInstance(java.security.Provider provider) throws java.security.NoSuchAlgorithmException
This method calls KeyAgreement.getInstance(algorithm,provider) by
substituting implementationName, JCA standard name, OID string and OID name (in that order)
for the algorithm
parameter in KeyAgreement.getInstance(algorithm,provider)
.
If Provider object based JCA/JCE KeyAgreement engine instantiation
is not available the Java VM in use (<1.4), this method tries to get an implementation
based on the provider name (if the Provider is installed within the Security Provider
framework). I.e. if method KeyAgreement.getInstance(algorithm,provider)
is not available method KeyAgreement.getInstance(algorithm,provider.getName())
is tried.
If null
is given as provider
a KeyAgreement implementation of
the first installed Provider that implements this algorithm id is returned
(KeyAgreement.getInstance(algorithm)
.
provider
- the provider from which to get a KeyAgreement engine for this AlgorithmIDjava.security.NoSuchAlgorithmException
- if there is no KeyAgreement implementation available for this AlgorithmiD
from the given provider (or from any installed provider if provider
is null
)public java.security.KeyFactory getKeyFactoryInstance() throws java.security.NoSuchAlgorithmException
algorithm
parameter in KeyFactory.getInstance(algorithm)
.java.security.NoSuchAlgorithmException
- if there is no KeyFactory implementationpublic java.security.KeyFactory getKeyFactoryInstance(java.lang.String provider) throws java.security.NoSuchAlgorithmException
algorithm
parameter in KeyFactory.getInstance(algorithm,provider).provider
- the name of the requested providerjava.security.NoSuchAlgorithmException
- if there is no KeyFactory implementationpublic java.security.KeyFactory getKeyFactoryInstance(java.security.Provider provider) throws java.security.NoSuchAlgorithmException
This method calls KeyFactory.getInstance(algorithm,provider) by
substituting implementationName, JCA standard name, OID string and OID name (in that order)
for the algorithm
parameter in KeyFactory.getInstance(algorithm,provider)
.
If Provider object based JCA/JCE KeyFactory engine instantiation
is not available the Java VM in use (<1.4), this method tries to get an implementation
based on the provider name (if the Provider is installed within the Security Provider
framework). I.e. if method KeyFactory.getInstance(algorithm,provider)
is not available method KeyFactory.getInstance(algorithm,provider.getName())
is tried.
If null
is given as provider
a KeyFactory implementation of
the first installed Provider that implements this algorithm id is returned
(KeyFactory.getInstance(algorithm)
.
provider
- the provider from which to get a KeyFactory engine for this AlgorithmIDjava.security.NoSuchAlgorithmException
- if there is no KeyFactory implementation available for this AlgorithmiD
from the given provider (or from any installed provider if provider
is null
)public java.security.KeyPairGenerator getKeyPairGeneratorInstance() throws java.security.NoSuchAlgorithmException
algorithm
parameter in KeyPairGenerator.getInstance(algorithm)
.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 implementationName, JCA standard name, OID string and OID name
(in that order) for the algorithm
parameter in
KeyPairGenerator.getInstance(algorithm,provider)
.
provider
- the name of the requested providerjava.security.NoSuchAlgorithmException
- if there is no KeyPairGenerator implementationpublic java.security.KeyPairGenerator getKeyPairGeneratorInstance(java.security.Provider provider) throws java.security.NoSuchAlgorithmException
This method calls KeyPairGenerator.getInstance(algorithm,provider) by
substituting implementationName, JCA standard name, OID string and OID name (in that order)
for the algorithm
parameter in KeyPairGenerator.getInstance(algorithm,provider)
.
If Provider object based JCA/JCE KeyPairGenerator engine instantiation
is not available the Java VM in use (<1.4), this method tries to get an implementation
based on the provider name (if the Provider is installed within the Security Provider
framework). I.e. if method KeyPairGenerator.getInstance(algorithm,provider)
is not available method KeyPairGenerator.getInstance(algorithm,provider.getName())
is tried.
If null
is given as provider
a KeyPairGenerator implementation of
the first installed Provider that implements this algorithm id is returned
(KeyPairGenerator.getInstance(algorithm)
.
provider
- the provider from which to get a KeyPairGenerator engine for this AlgorithmIDjava.security.NoSuchAlgorithmException
- if there is no KeyPairGenerator implementation available for this AlgorithmiD
from the given provider (or from any installed provider if provider
is null
)public javax.crypto.KeyGenerator getKeyGeneratorInstance() throws java.security.NoSuchAlgorithmException
algorithm
parameter in KeyGenerator.getInstance(algorithm)
.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) substituting
raw implementation name, implementationName, JCA standard name, OID string and OID name (in that order)
for the algorithm
parameter in KeyGenerator.getInstance(algorithm,provider)
.
provider
- the name of the requested providerjava.security.NoSuchAlgorithmException
- if there is no KeyGenerator implementationpublic javax.crypto.KeyGenerator getKeyGeneratorInstance(java.security.Provider provider) throws java.security.NoSuchAlgorithmException
This method calls KeyGenerator.getInstance(algorithm,provider) by
substituting raw implementation name, implementationName, JCA standard name, OID string and OID name (in that order)
for the algorithm
parameter in KeyGenerator.getInstance(algorithm,provider)
.
If Provider object based JCA/JCE KeyGenerator engine instantiation
is not available the Java VM in use (<1.4), this method tries to get an implementation
based on the provider name (if the Provider is installed within the Security Provider
framework). I.e. if method KeyGenerator.getInstance(algorithm,provider)
is not available method KeyGenerator.getInstance(algorithm,provider.getName())
is tried.
If null
is given as provider
a KeyGenerator implementation of
the first installed Provider that implements this algorithm id is returned
(KeyGenerator.getInstance(algorithm)
.
provider
- the provider from which to get a KeyGenerator engine for this AlgorithmIDjava.security.NoSuchAlgorithmException
- if there is no KeyGenerator implementation available for this AlgorithmiD
from the given provider (or from any installed provider if provider
is null
)public javax.crypto.SecretKeyFactory getSecretKeyFactoryInstance() throws java.security.NoSuchAlgorithmException
algorithm
parameter in SecretKeyFactory.getInstance(algorithm)
.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 substituting raw implementationName,
OID string, OID name, implementationName and JCA standard name (in that order).
for the algorithm
parameter in
SecretKeyFactory.getInstance(algorithm,provider)
.
provider
- the name of the requested providerjava.security.NoSuchAlgorithmException
- if there is no SecretKeyFactory implementationpublic javax.crypto.SecretKeyFactory getSecretKeyFactoryInstance(java.security.Provider provider) throws java.security.NoSuchAlgorithmException
This method calls SecretKeyFactory.getInstance(algorithm,provider) by
substituting raw implementationName, OID string, OID name, implementationName
and JCA standard name (in that order)
for the algorithm
parameter in SecretKeyFactory.getInstance(algorithm,provider)
.
If Provider object based JCA/JCE SecretKeyFactory engine instantiation
is not available the Java VM in use (<1.4), this method tries to get an implementation
based on the provider name (if the Provider is installed within the Security Provider
framework). I.e. if method SecretKeyFactory.getInstance(algorithm,provider)
is not available method SecretKeyFactory.getInstance(algorithm,provider.getName())
is tried.
If null
is given as provider
a SecretKeyFactory implementation of
the first installed Provider that implements this algorithm id is returned
(SecretKeyFactory.getInstance(algorithm)
.
provider
- the provider from which to get a SecretKeyFactory engine for this AlgorithmIDjava.security.NoSuchAlgorithmException
- if there is no SecretKeyFactory implementation available for this AlgorithmiD
from the given provider (or from any installed provider if provider
is null
)public java.security.AlgorithmParameters getAlgorithmParametersInstance(java.security.Provider provider) throws java.security.NoSuchAlgorithmException
This method calls AlgorithmParameters.getInstance(algorithm,provider) by
substituting implementationName, JCA standard name, raw implementation name, OID string and OID name (in that order)
for the algorithm
parameter in AlgorithmParameters.getInstance(algorithm,provider)
.
If Provider object based JCA/JCE AlgorithmParameters engine instantiation
is not available the Java VM in use (<1.4), this method tries to get an implementation
based on the provider name (if the Provider is installed within the Security Provider
framework). I.e. if method AlgorithmParameters.getInstance(algorithm,provider)
is not available method AlgorithmParameters.getInstance(algorithm,provider.getName())
is tried.
If null
is given as provider
an AlgorithmParameters implementation of
the first installed Provider that implements this algorithm id is returned
(AlgorithmParameters.getInstance(algorithm)
.
provider
- the provider from which to get an AlgorithmParameters engine for this AlgorithmIDjava.security.NoSuchAlgorithmException
- if there is no AlgorithmParameters implementation available for this AlgorithmiD
from the given provider (or from any installed provider if provider
is null
)public MaskGenerationAlgorithm getMaskGenerationAlgorithmInstance() throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException
- if there is no MaskGenerationAlgorithm implementation
available for this algorithm idpublic MaskGenerationAlgorithm getMaskGenerationAlgorithmInstance(java.lang.String provider) throws java.security.NoSuchAlgorithmException
provider
- the name of the requested providerjava.security.NoSuchAlgorithmException
- if there is no MaskGenerationAlgorithm implementation
available for this algorithm idpublic MaskGenerationAlgorithm getMaskGenerationAlgorithmInstance(java.security.Provider provider) throws java.security.NoSuchAlgorithmException
This method calls MaskGenerationAlgorithm.getInstance(algorithm,provider) by
substituting implementationName, JCA standard name, OID string and OID name (in that order)
for the algorithm
parameter in MaskGenerationAlgorithm.getInstance(algorithm,provider)
.
If Provider object based JCA/JCE MaskGenerationAlgorithm engine instantiation
is not available the Java VM in use (<1.4), this method tries to get an implementation
based on the provider name (if the Provider is installed within the Security Provider
framework). I.e. if method MaskGenerationAlgorithm.getInstance(algorithm,provider)
is not available method MaskGenerationAlgorithm.getInstance(algorithm,provider.getName())
is tried.
If null
is given as provider
a MaskGenerationAlgorithm implementation of
the first installed Provider that implements this algorithm id is returned
(MaskGenerationAlgorithm.getInstance(algorithm)
.
provider
- the provider from which to get a MaskGenerationAlgorithm engine for this AlgorithmIDjava.security.NoSuchAlgorithmException
- if there is no MaskGenerationAlgorithm implementation available for this AlgorithmiD
from the given provider (or from any installed provider if provider
is null
)public 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 AES-CBC may be
"AES/CBC/PKC5Padding" which may be suitable for creating a Cipher object,
but not for creating a key generator where only "AES" is required as
returned by this method.
For signature algorithms the raw implementation name represents the "key" algorithm name (without the hash algorithm name), e.g. "RSA" for "SHA1withRSA".
java.security.NoSuchAlgorithmException
public java.lang.Object clone()
AlgorithmID algID = (AlgorithmID)AlgorithmID.des_EDE_CBC.clone(); AlgorithmParameters params = ...; algID.setAlgorithmParameters(...);
clone
in class java.lang.Object
public ObjectID getAlgorithm()
ObjectID
public ASN1Object getParameter()
null
if no
parameters are includedpublic boolean hasParameters()
true
if parameters are included that are different
from ASN.1 NULL; false
otherwisepublic 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(java.lang.String algorithm, java.security.Provider provider) throws java.security.NoSuchAlgorithmException
java.security.AlgorithmParameters
object.
AlgorithmParameters.getInstance(algorithm,provider)
is not available method AlgorithmParameters.getInstance(algorithm,provider.getName())
is tried.algorithm
- the name of the algorithm the parameters belong toprovider
- 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 setAlgorithmParameterSpec(java.security.spec.AlgorithmParameterSpec parameters) throws java.security.InvalidAlgorithmParameterException
AlgorithmParameterSpec
object.parameters
- the parameters to be setjava.security.InvalidAlgorithmParameterException
- if the parameters cannot be setpublic void setAlgorithmParameterSpec(java.security.spec.AlgorithmParameterSpec parameters, java.lang.String provider) throws java.security.InvalidAlgorithmParameterException
AlgorithmParameterSpec
object.parameters
- the parameters to be setprovider
- The JCA provider to use for the parameter encoding. If
null
, it uses the JCA defaults.java.security.InvalidAlgorithmParameterException
- if the parameters cannot be set (e.g.
are not suitable for the algorithm represented
by this AlgorithmID)public void setAlgorithmParameterSpec(java.security.spec.AlgorithmParameterSpec parameters, java.security.Provider provider) throws java.security.InvalidAlgorithmParameterException
AlgorithmParameterSpec
object.parameters
- the parameters to be setprovider
- The JCA provider to use for the parameter encoding. If
null
, it uses the JCA defaults.java.security.InvalidAlgorithmParameterException
- if the parameters cannot be set (e.g.
are not suitable for the algorithm represented
by this AlgorithmID)public void setParameter(ASN1Object parameters)
parameters
- the parameters of the algorithmpublic java.security.spec.AlgorithmParameterSpec getAlgorithmParameterSpec() throws java.security.InvalidAlgorithmParameterException
getAlgorithmParameterSpec(String)
with null
as argument.java.security.spec.AlgorithmParameterSpec
object or null
if the given algorithm ID does not
contain parameters.java.security.InvalidAlgorithmParameterException
- If the included parameters could not be converted to an
algorithm parameter spec object.public java.security.spec.AlgorithmParameterSpec getAlgorithmParameterSpec(java.lang.String provider) throws java.security.InvalidAlgorithmParameterException
java.security.spec.AlgorithmParameterSpec
object. It uses the
AlgorithmParameterSpec
class which has been provided to the
AlgorithmID(String, String, String, Class)
constructor.provider
- The JCA provider to use for the parameter parsing. If
null
, it uses the JCA defaults.java.security.spec.AlgorithmParameterSpec
object or null
if the given algorithm ID does not
contain parameters.java.security.InvalidAlgorithmParameterException
- If the included parameters could not be converted to an
algorithm parameter spec object.public java.security.spec.AlgorithmParameterSpec getAlgorithmParameterSpec(java.lang.Class parameterSpecClass, java.lang.String provider) throws java.security.InvalidAlgorithmParameterException
AlgorithmParameterSpec
instance of the given parameterSpecClass name.provider
- The JCA provider to use for the parameter parsing. If
null
, it uses the JCA defaults.parameterSpecClass
- the AlgorithmParameterSpec implementing class
(e.g. IvParameterSpec.class) representing the parameters of
this AlgorithmIDjava.security.spec.AlgorithmParameterSpec
object, or null
if the given algorithm ID does not
contain parameters or parameterSpecClass
is not specifiedjava.security.InvalidAlgorithmParameterException
- If the included parameters could not be converted to an
algorithm parameter spec object or the given parameterSpecClass
is invalid (does not implement the AlgorithmParameterSpec
interface)public java.security.spec.AlgorithmParameterSpec getAlgorithmParameterSpec(java.security.Provider provider) throws java.security.InvalidAlgorithmParameterException
java.security.spec.AlgorithmParameterSpec
object. It uses the
AlgorithmParameterSpec
class which has been provided to the
AlgorithmID(String, String, String, Class)
constructor.
AlgorithmParameters.getInstance(algorithm,provider)
is not available method AlgorithmParameters.getInstance(algorithm,provider.getName())
is tried.provider
- The JCA provider to use for the parameter parsing. If
null
, it uses the JCA defaults.java.security.spec.AlgorithmParameterSpec
object or null
if the given algorithm ID does not
contain parameters.java.security.InvalidAlgorithmParameterException
- If the included parameters could not be converted to an
algorithm parameter spec object.public java.security.spec.AlgorithmParameterSpec getAlgorithmParameterSpec(java.lang.Class parameterSpecClass, java.security.Provider provider) throws java.security.InvalidAlgorithmParameterException
AlgorithmParameterSpec
instance of the given parameterSpecClass name.
AlgorithmParameters.getInstance(algorithm,provider)
is not available method AlgorithmParameters.getInstance(algorithm,provider.getName())
is tried.provider
- The JCA provider to use for the parameter parsing. If
null
, it uses the JCA defaults.parameterSpecClass
- the AlgorithmParameterSpec implementing class
(e.g. IvParameterSpec.class) representing the parameters of
this AlgorithmIDjava.security.spec.AlgorithmParameterSpec
object, or null
if the given algorithm ID does not
contain parameters or parameterSpecClass
is not specifiedjava.security.InvalidAlgorithmParameterException
- If the included parameters could not be converted to an
algorithm parameter spec object or the given parameterSpecClass
is invalid (does not implement the AlgorithmParameterSpec
interface)public java.security.AlgorithmParameterGenerator getAlgorithmParameterGeneratorInstance(java.lang.String provider) throws java.security.NoSuchAlgorithmException
This method calls AlgorithmParameterGenerator.getInstance(algorithm,provider) substituting
raw implementation name, implementationName, JCA standard name, OID string and OID name (in that order)
for the algorithm
parameter in AlgorithmParameterGenerator.getInstance(algorithm,provider)
.
provider
- the name of the requested providerjava.security.NoSuchAlgorithmException
- if there is no AlgorithmParameterGenerator implementationpublic java.security.AlgorithmParameterGenerator getAlgorithmParameterGeneratorInstance(java.security.Provider provider) throws java.security.NoSuchAlgorithmException
This method calls AlgorithmParameterGenerator.getInstance(algorithm,provider) by
substituting raw implementation name, implementationName, JCA standard name, OID string and OID name (in that order)
for the algorithm
parameter in AlgorithmParameterGenerator.getInstance(algorithm,provider)
.
If Provider object based JCA/JCE AlgorithmParameterGenerator engine instantiation
is not available the Java VM in use (<1.4), this method tries to get an implementation
based on the provider name (if the Provider is installed within the Security Provider
framework). I.e. if method AlgorithmParameterGenerator.getInstance(algorithm,provider)
is not available method AlgorithmParameterGenerator.getInstance(algorithm,provider.getName())
is tried.
If null
is given as provider
a AlgorithmParameterGenerator implementation of
the first installed Provider that implements this algorithm id is returned
(AlgorithmParameterGenerator.getInstance(algorithm)
.
provider
- the provider from which to get a AlgorithmParameterGenerator engine for this AlgorithmIDjava.security.NoSuchAlgorithmException
- if there is no AlgorithmParameterGenerator implementation available for this AlgorithmiD
from the given provider (or from any installed provider if provider
is null
)public java.security.AlgorithmParameterGenerator getAlgorithmParameterGeneratorInstance() throws java.security.NoSuchAlgorithmException
algorithm
parameter in AlgorithmParameterGenerator.getInstance(algorithm)
.java.security.NoSuchAlgorithmException
- if there is no AlgorithmParameterGenerator implementationpublic java.lang.String getName()
public boolean equals(java.lang.Object obj)
equals(obj, checkParams)
if you want to
compare the parameters, too.equals
in class java.lang.Object
obj
- the other AlgorithmIDtrue
, if the two Algorithm IDs are equal,
false
otherwisepublic boolean equals(java.lang.Object obj, boolean checkParams)
obj
- the other AlgorithmIDcheckParams
- whether to compare the parameter fields, tootrue
, if the two AlgorithmIDs are equal,
false
otherwisepublic int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object