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 EncryptionAlgorithmforKey(Key key)Returns the encryption algorithm associated to the given key.static EncryptionAlgorithmforName(String name)Returns the encryption algorithm associated to the given JCE name.static EncryptionAlgorithmforName(String name, EncryptionAlgorithm defaultValue)Returns the encryption algorithm associated to the given JCE name.static EncryptionAlgorithmforOID(String oid)Returns the encryption algorithm associated to the given OID.StringgetName()Get the algorithm nameStringgetOid()Get the ASN1 algorithm OIDStringgetPadding()Get the algorithm paddingstatic EncryptionAlgorithmvalueOf(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
EncryptionAlgorithmor the default value
-
getName
Get the algorithm name- Returns:
- the name
-
getOid
Get the ASN1 algorithm OID- Specified by:
getOidin interfaceOidBasedEnum- Returns:
- the OID
-
getPadding
Get the algorithm padding- Returns:
- the padding
-