Package eu.europa.esig.dss.enumerations
Enum EncryptionAlgorithm
- All Implemented Interfaces:
OidBasedEnum
,Serializable
,Comparable<EncryptionAlgorithm>
public enum EncryptionAlgorithm extends Enum<EncryptionAlgorithm> implements OidBasedEnum
Supported signature encryption algorithms.
-
Enum Constant Summary
-
Method Summary
Modifier and Type Method Description static EncryptionAlgorithm
forKey(Key key)
Returns the encryption algorithm associated to the given key.static EncryptionAlgorithm
forName(String name)
Returns the encryption algorithm associated to the given JCE name.static EncryptionAlgorithm
forName(String name, EncryptionAlgorithm defaultValue)
Returns the encryption algorithm associated to the given JCE name.static EncryptionAlgorithm
forOID(String oid)
Returns the encryption algorithm associated to the given OID.String
getName()
Get the algorithm nameString
getOid()
Get the ASN1 algorithm OIDString
getPadding()
Get the algorithm paddingstatic EncryptionAlgorithm
valueOf(String name)
Returns the enum constant of this type with the specified name.static EncryptionAlgorithm[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
forOID
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
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
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
Returns the encryption algorithm associated to the given JCE name.- Parameters:
name
- the encryption algorithm namedefaultValue
- The default value for theEncryptionAlgorithm
- Returns:
- the corresponding
EncryptionAlgorithm
or the default value
-
getName
Get the algorithm name- Returns:
- the name
-
getOid
Get the ASN1 algorithm OID- Specified by:
getOid
in interfaceOidBasedEnum
- Returns:
- the OID
-
getPadding
Get the algorithm padding- Returns:
- the padding
-