Class Algorithm

    • Field Detail

      • oidIndex

        protected int oidIndex
        Index into the SECOidTag array in Algorithm.c.
      • SEC_OID_PKCS1_MD2_WITH_RSA_ENCRYPTION

        protected static final int SEC_OID_PKCS1_MD2_WITH_RSA_ENCRYPTION
        See Also:
        Constant Field Values
      • SEC_OID_PKCS1_MD5_WITH_RSA_ENCRYPTION

        protected static final int SEC_OID_PKCS1_MD5_WITH_RSA_ENCRYPTION
        See Also:
        Constant Field Values
      • SEC_OID_PKCS1_SHA1_WITH_RSA_ENCRYPTION

        protected static final int SEC_OID_PKCS1_SHA1_WITH_RSA_ENCRYPTION
        See Also:
        Constant Field Values
      • SEC_OID_ANSIX9_DSA_SIGNATURE_WITH_SHA1_DIGEST

        protected static final int SEC_OID_ANSIX9_DSA_SIGNATURE_WITH_SHA1_DIGEST
        See Also:
        Constant Field Values
      • SEC_OID_PKCS1_RSA_ENCRYPTION

        protected static final int SEC_OID_PKCS1_RSA_ENCRYPTION
        See Also:
        Constant Field Values
      • CKM_RSA_PKCS_KEY_PAIR_GEN

        protected static final int CKM_RSA_PKCS_KEY_PAIR_GEN
        See Also:
        Constant Field Values
      • SEC_OID_ANSIX9_DSA_SIGNATURE

        protected static final int SEC_OID_ANSIX9_DSA_SIGNATURE
        See Also:
        Constant Field Values
      • SEC_OID_PKCS5_PBE_WITH_MD2_AND_DES_CBC

        protected static final int SEC_OID_PKCS5_PBE_WITH_MD2_AND_DES_CBC
        See Also:
        Constant Field Values
      • SEC_OID_PKCS5_PBE_WITH_MD5_AND_DES_CBC

        protected static final int SEC_OID_PKCS5_PBE_WITH_MD5_AND_DES_CBC
        See Also:
        Constant Field Values
      • SEC_OID_PKCS5_PBE_WITH_SHA1_AND_DES_CBC

        protected static final int SEC_OID_PKCS5_PBE_WITH_SHA1_AND_DES_CBC
        See Also:
        Constant Field Values
      • SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_128_BIT_RC4

        protected static final int SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_128_BIT_RC4
        See Also:
        Constant Field Values
      • SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_40_BIT_RC4

        protected static final int SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_40_BIT_RC4
        See Also:
        Constant Field Values
      • SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_3KEY_TRIPLE_DES_CBC

        protected static final int SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_3KEY_TRIPLE_DES_CBC
        See Also:
        Constant Field Values
      • SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_128_BIT_RC2_CBC

        protected static final int SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_128_BIT_RC2_CBC
        See Also:
        Constant Field Values
      • SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_40_BIT_RC2_CBC

        protected static final int SEC_OID_PKCS12_V2_PBE_WITH_SHA1_AND_40_BIT_RC2_CBC
        See Also:
        Constant Field Values
      • CKM_PBA_SHA1_WITH_SHA1_HMAC

        protected static final int CKM_PBA_SHA1_WITH_SHA1_HMAC
        See Also:
        Constant Field Values
      • SEC_OID_PKCS1_SHA256_WITH_RSA_ENCRYPTION

        protected static final int SEC_OID_PKCS1_SHA256_WITH_RSA_ENCRYPTION
        See Also:
        Constant Field Values
      • SEC_OID_PKCS1_SHA384_WITH_RSA_ENCRYPTION

        protected static final int SEC_OID_PKCS1_SHA384_WITH_RSA_ENCRYPTION
        See Also:
        Constant Field Values
      • SEC_OID_PKCS1_SHA512_WITH_RSA_ENCRYPTION

        protected static final int SEC_OID_PKCS1_SHA512_WITH_RSA_ENCRYPTION
        See Also:
        Constant Field Values
      • SEC_OID_ANSIX962_EC_PUBLIC_KEY

        protected static final int SEC_OID_ANSIX962_EC_PUBLIC_KEY
        See Also:
        Constant Field Values
      • SEC_OID_ANSIX962_ECDSA_SHA1_SIGNATURE

        protected static final int SEC_OID_ANSIX962_ECDSA_SHA1_SIGNATURE
        See Also:
        Constant Field Values
      • SEC_OID_ANSIX962_ECDSA_SHA256_SIGNATURE

        protected static final int SEC_OID_ANSIX962_ECDSA_SHA256_SIGNATURE
        See Also:
        Constant Field Values
      • SEC_OID_ANSIX962_ECDSA_SHA384_SIGNATURE

        protected static final int SEC_OID_ANSIX962_ECDSA_SHA384_SIGNATURE
        See Also:
        Constant Field Values
      • SEC_OID_ANSIX962_ECDSA_SHA512_SIGNATURE

        protected static final int SEC_OID_ANSIX962_ECDSA_SHA512_SIGNATURE
        See Also:
        Constant Field Values
      • SEC_OID_ANSIX962_ECDSA_SIGNATURE_SPECIFIED_DIGEST

        protected static final int SEC_OID_ANSIX962_ECDSA_SIGNATURE_SPECIFIED_DIGEST
        See Also:
        Constant Field Values
      • CKM_NSS_AES_KEY_WRAP_PAD

        protected static final int CKM_NSS_AES_KEY_WRAP_PAD
        See Also:
        Constant Field Values
      • CKM_GENERIC_SECRET_KEY_GEN

        protected static final int CKM_GENERIC_SECRET_KEY_GEN
        See Also:
        Constant Field Values
      • CKM_SP800_108_COUNTER_KDF

        protected static final int CKM_SP800_108_COUNTER_KDF
        See Also:
        Constant Field Values
      • CKM_SP800_108_FEEDBACK_KDF

        protected static final int CKM_SP800_108_FEEDBACK_KDF
        See Also:
        Constant Field Values
      • CKM_SP800_108_DOUBLE_PIPELINE_KDF

        protected static final int CKM_SP800_108_DOUBLE_PIPELINE_KDF
        See Also:
        Constant Field Values
      • CKM_NSS_SP800_108_COUNTER_KDF_DERIVE_DATA

        protected static final int CKM_NSS_SP800_108_COUNTER_KDF_DERIVE_DATA
        See Also:
        Constant Field Values
      • CKM_NSS_SP800_108_FEEDBACK_KDF_DERIVE_DATA

        protected static final int CKM_NSS_SP800_108_FEEDBACK_KDF_DERIVE_DATA
        See Also:
        Constant Field Values
      • CKM_NSS_SP800_108_DOUBLE_PIPELINE_KDF_DERIVE_DATA

        protected static final int CKM_NSS_SP800_108_DOUBLE_PIPELINE_KDF_DERIVE_DATA
        See Also:
        Constant Field Values
      • SEC_OID_PKCS1_RSA_PSS_SIGNATURE

        protected static final int SEC_OID_PKCS1_RSA_PSS_SIGNATURE
        See Also:
        Constant Field Values
      • SEC_OID_AES_128_KEY_WRAP_KWP

        protected static final int SEC_OID_AES_128_KEY_WRAP_KWP
        See Also:
        Constant Field Values
      • SEC_OID_AES_192_KEY_WRAP_KWP

        protected static final int SEC_OID_AES_192_KEY_WRAP_KWP
        See Also:
        Constant Field Values
      • SEC_OID_AES_256_KEY_WRAP_KWP

        protected static final int SEC_OID_AES_256_KEY_WRAP_KWP
        See Also:
        Constant Field Values
    • Constructor Detail

      • Algorithm

        protected Algorithm​(int oidIndex,
                            java.lang.String name)
        Parameters:
        oidIndex - Index of the oid that this algorithm represents.
        name - A String representation of the Algorithm.
      • Algorithm

        protected Algorithm​(int oidIndex,
                            java.lang.String name,
                            OBJECT_IDENTIFIER oid)
        Parameters:
        oidIndex - Index of the oid that this algorithm represents.
        name - A String representation of the Algorithm.
        oid - The object identifier for this Algorithm.
      • Algorithm

        protected Algorithm​(int oidIndex,
                            java.lang.String name,
                            OBJECT_IDENTIFIER oid,
                            java.lang.Class<?> paramClass)
      • Algorithm

        protected Algorithm​(int oidIndex,
                            java.lang.String name,
                            OBJECT_IDENTIFIER oid,
                            java.lang.Class<?>[] paramClasses)
    • Method Detail

      • toString

        public java.lang.String toString()
        Returns a String representation of the algorithm.
        Overrides:
        toString in class java.lang.Object
      • toOID

        public OBJECT_IDENTIFIER toOID()
                                throws java.security.NoSuchAlgorithmException
        Returns:
        The object identifier for this algorithm.
        Throws:
        java.security.NoSuchAlgorithmException - If no OID is registered for this algorithm.
      • getParameterClass

        @Deprecated
        public java.lang.Class<?> getParameterClass()
        Deprecated.
        Call getParameterClasses() instead.
        The type of parameter that this algorithm expects. Returns 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().
        Returns:
        Parameter type.
      • getParameterClasses

        public java.lang.Class<?>[] getParameterClasses()
        The types of parameter that this algorithm expects. Returns null if this algorithm does not take any parameters.
        Returns:
        Parameter types.
      • isValidParameterObject

        public boolean isValidParameterObject​(java.lang.Object o)
        Validates if the given Object can be used as a parameter for this algorithm.

        If null is passed in, this method will return true if this algorithm takes no parameters, and false if this algorithm does take parameters.

        Parameters:
        o - Object.
        Returns:
        Returns true if the given Object can be used as a parameter.