public class Algorithm
extends java.lang.Object
EncryptionAlgorithm
,
SignatureAlgorithm
Modifier | Constructor and Description |
---|---|
protected |
Algorithm(int oidIndex,
java.lang.String name) |
protected |
Algorithm(int oidIndex,
java.lang.String name,
OBJECT_IDENTIFIER oid) |
protected |
Algorithm(int oidIndex,
java.lang.String name,
OBJECT_IDENTIFIER oid,
java.lang.Class<?> paramClass) |
protected |
Algorithm(int oidIndex,
java.lang.String name,
OBJECT_IDENTIFIER oid,
java.lang.Class<?>[] paramClasses) |
Modifier and Type | Method and Description |
---|---|
PKCS11Algorithm |
getEnum() |
java.lang.Class<?> |
getParameterClass()
Deprecated.
Call
getParameterClasses() instead. |
java.lang.Class<?>[] |
getParameterClasses()
The types of parameter that this algorithm expects.
|
boolean |
isValidParameterObject(java.lang.Object o)
Validates if the given Object can be used as a parameter
for this algorithm.
|
OBJECT_IDENTIFIER |
toOID() |
java.lang.String |
toString()
Returns a String representation of the algorithm.
|
protected int oidIndex
protected OBJECT_IDENTIFIER oid
protected static final int SEC_OID_PKCS1_MD2_WITH_RSA_ENCRYPTION
protected static final int SEC_OID_PKCS1_MD5_WITH_RSA_ENCRYPTION
protected static final int SEC_OID_PKCS1_SHA1_WITH_RSA_ENCRYPTION
protected static final int SEC_OID_ANSIX9_DSA_SIGNATURE_WITH_SHA1_DIGEST
protected static final int SEC_OID_PKCS1_RSA_ENCRYPTION
protected static final int CKM_RSA_PKCS_KEY_PAIR_GEN
protected static final int CKM_DSA_KEY_PAIR_GEN
protected static final int SEC_OID_ANSIX9_DSA_SIGNATURE
protected static final int SEC_OID_RC4
protected static final int SEC_OID_DES_ECB
protected static final int SEC_OID_DES_CBC
protected static final int CKM_DES_CBC_PAD
protected static final int CKM_DES3_ECB
protected static final int SEC_OID_DES_EDE3_CBC
protected static final int CKM_DES3_CBC_PAD
protected static final int CKM_DES_KEY_GEN
protected static final int CKM_DES3_KEY_GEN
protected static final int CKM_RC4_KEY_GEN
protected static final int SEC_OID_PKCS5_PBE_WITH_MD2_AND_DES_CBC
protected static final int SEC_OID_PKCS5_PBE_WITH_MD5_AND_DES_CBC
protected static final int SEC_OID_PKCS5_PBE_WITH_SHA1_AND_DES_CBC
protected static final int SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_128_BIT_RC4
protected static final int SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_40_BIT_RC4
protected static final int SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_3KEY_TRIPLE_DES_CBC
protected static final int SEC_OID_MD2
protected static final int SEC_OID_MD5
protected static final int SEC_OID_SHA1
protected static final int CKM_SHA_1_HMAC
protected static final int SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_128_BIT_RC2_CBC
protected static final int SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_40_BIT_RC2_CBC
protected static final int SEC_OID_RC2_CBC
protected static final int CKM_PBA_SHA1_WITH_SHA1_HMAC
protected static final int CKM_AES_KEY_GEN
protected static final int CKM_AES_ECB
protected static final int CKM_AES_CBC
protected static final int CKM_AES_CBC_PAD
protected static final int CKM_RC2_CBC_PAD
protected static final int CKM_RC2_KEY_GEN
protected static final int SEC_OID_SHA256
protected static final int SEC_OID_SHA384
protected static final int SEC_OID_SHA512
protected static final int SEC_OID_PKCS1_SHA256_WITH_RSA_ENCRYPTION
protected static final int SEC_OID_PKCS1_SHA384_WITH_RSA_ENCRYPTION
protected static final int SEC_OID_PKCS1_SHA512_WITH_RSA_ENCRYPTION
protected static final int SEC_OID_ANSIX962_EC_PUBLIC_KEY
protected static final int SEC_OID_ANSIX962_ECDSA_SHA1_SIGNATURE
protected static final int CKM_EC_KEY_PAIR_GEN
protected static final int SEC_OID_ANSIX962_ECDSA_SHA256_SIGNATURE
protected static final int SEC_OID_ANSIX962_ECDSA_SHA384_SIGNATURE
protected static final int SEC_OID_ANSIX962_ECDSA_SHA512_SIGNATURE
protected static final int SEC_OID_HMAC_SHA256
protected static final int SEC_OID_HMAC_SHA384
protected static final int SEC_OID_HMAC_SHA512
protected static final int SEC_OID_PKCS5_PBKDF2
protected static final int SEC_OID_PKCS5_PBES2
protected static final int SEC_OID_PKCS5_PBMAC1
protected static final int SEC_OID_ANSIX962_ECDSA_SIGNATURE_SPECIFIED_DIGEST
protected static final int CKM_NSS_AES_KEY_WRAP
protected static final int CKM_NSS_AES_KEY_WRAP_PAD
protected static final int SEC_OID_AES_128_ECB
protected static final int SEC_OID_AES_128_CBC
protected static final int SEC_OID_AES_192_ECB
protected static final int SEC_OID_AES_192_CBC
protected static final int SEC_OID_AES_256_ECB
protected static final int SEC_OID_AES_256_CBC
protected static final int CKM_AES_KEY_WRAP
protected static final int CKM_AES_KEY_WRAP_PAD
protected static final int CKM_SHA256_HMAC
protected static final int CKM_SHA384_HMAC
protected static final int CKM_SHA512_HMAC
protected static final int CKM_AES_CMAC
protected static final int CKM_GENERIC_SECRET_KEY_GEN
protected static final int CKM_SP800_108_COUNTER_KDF
protected static final int CKM_SP800_108_FEEDBACK_KDF
protected static final int CKM_SP800_108_DOUBLE_PIPELINE_KDF
protected static final int CKM_NSS_SP800_108_COUNTER_KDF_DERIVE_DATA
protected static final int CKM_NSS_SP800_108_FEEDBACK_KDF_DERIVE_DATA
protected static final int CKM_NSS_SP800_108_DOUBLE_PIPELINE_KDF_DERIVE_DATA
protected static final short SEC_OID_PKCS1_RSA_PSS_SIGNATURE
protected Algorithm(int oidIndex, java.lang.String name)
oidIndex
- Index of the oid that this algorithm represents.name
- A String representation of the Algorithm.protected Algorithm(int oidIndex, java.lang.String name, OBJECT_IDENTIFIER oid)
oidIndex
- Index of the oid that this algorithm represents.name
- A String representation of the Algorithm.oid
- The object identifier for this Algorithm.protected Algorithm(int oidIndex, java.lang.String name, OBJECT_IDENTIFIER oid, java.lang.Class<?> paramClass)
protected Algorithm(int oidIndex, java.lang.String name, OBJECT_IDENTIFIER oid, java.lang.Class<?>[] paramClasses)
public java.lang.String toString()
toString
in class java.lang.Object
public OBJECT_IDENTIFIER toOID() throws java.security.NoSuchAlgorithmException
java.security.NoSuchAlgorithmException
- If no OID is registered for this
algorithm.@Deprecated public java.lang.Class<?> getParameterClass()
getParameterClasses()
instead.null
if this algorithm does not take any parameters.
If the algorithm can accept more than one type of parameter,
this method returns only one of them. It is better to call
getParameterClasses()
.public java.lang.Class<?>[] getParameterClasses()
null
if this algorithm does not take any parameters.public boolean isValidParameterObject(java.lang.Object o)
If null
is passed in, this method will return true
if this algorithm takes no parameters, and false
if this algorithm does take parameters.
o
- Object.true
if the given Object can be used as a parameter.public PKCS11Algorithm getEnum()