Enum EncryptionAlgorithm

    • Method Detail

      • values

        public static EncryptionAlgorithm[] values()
        Returns an array containing the constants of this enum type, in the order they are declared.
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static EncryptionAlgorithm valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • forOID

        public static EncryptionAlgorithm forOID​(String oid)
        Returns the encryption algorithm associated to the given OID.
        Parameters:
        oid - the ASN1 algorithm OID
        Returns:
        the linked encryption algorithm
        Throws:
        IllegalArgumentException - if the oid doesn't match any algorithm
      • forKey

        public static EncryptionAlgorithm forKey​(Key key)
        Returns the encryption algorithm associated to the given key.
        Parameters:
        key - the key
        Returns:
        the linked encryption algorithm
        Throws:
        IllegalArgumentException - if the key doesn't match any algorithm
      • forName

        public static EncryptionAlgorithm forName​(String name)
        Returns the encryption algorithm associated to the given JCE name.
        Parameters:
        name - the encryption algorithm name
        Returns:
        the linked encryption algorithm
        Throws:
        IllegalArgumentException - if the name doesn't match any algorithm
      • forName

        public static EncryptionAlgorithm forName​(String name,
                                                  EncryptionAlgorithm defaultValue)
        Returns the encryption algorithm associated to the given JCE name.
        Parameters:
        name - the encryption algorithm name
        defaultValue - The default value for the EncryptionAlgorithm
        Returns:
        the corresponding EncryptionAlgorithm or the default value
      • getName

        public String getName()
        Get the algorithm name
        Returns:
        the name
      • getOid

        public String getOid()
        Get the ASN1 algorithm OID
        Specified by:
        getOid in interface OidBasedEnum
        Returns:
        the OID
      • getPadding

        public String getPadding()
        Get the algorithm padding
        Returns:
        the padding