Package com.helger.as2lib.crypto
Enum ECryptoAlgorithmCrypt
- java.lang.Object
-
- java.lang.Enum<ECryptoAlgorithmCrypt>
-
- com.helger.as2lib.crypto.ECryptoAlgorithmCrypt
-
- All Implemented Interfaces:
ICryptoAlgorithm,com.helger.commons.id.IHasID<String>,Serializable,Comparable<ECryptoAlgorithmCrypt>
public enum ECryptoAlgorithmCrypt extends Enum<ECryptoAlgorithmCrypt> implements ICryptoAlgorithm
Enumeration with all message encryption algorithms supported.- Author:
- Philip Helger
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CRYPT_3DESCRYPT_AES128_CBCCRYPT_AES128_GCMCRYPT_AES192_CBCCRYPT_AES192_GCMCRYPT_AES256_CBCCRYPT_AES256_GCMCRYPT_CAST5CRYPT_IDEACRYPT_RC2
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ECryptoAlgorithmCryptgetFromIDOrDefault(String sID, ECryptoAlgorithmCrypt eDefault)static ECryptoAlgorithmCryptgetFromIDOrNull(String sID)static ECryptoAlgorithmCryptgetFromIDOrThrow(String sID)StringgetID()org.bouncycastle.asn1.ASN1ObjectIdentifiergetOID()static ECryptoAlgorithmCryptvalueOf(String name)Returns the enum constant of this type with the specified name.static ECryptoAlgorithmCrypt[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CRYPT_3DES
public static final ECryptoAlgorithmCrypt CRYPT_3DES
-
CRYPT_CAST5
public static final ECryptoAlgorithmCrypt CRYPT_CAST5
-
CRYPT_IDEA
public static final ECryptoAlgorithmCrypt CRYPT_IDEA
-
CRYPT_RC2
public static final ECryptoAlgorithmCrypt CRYPT_RC2
-
CRYPT_AES128_CBC
public static final ECryptoAlgorithmCrypt CRYPT_AES128_CBC
-
CRYPT_AES192_CBC
public static final ECryptoAlgorithmCrypt CRYPT_AES192_CBC
-
CRYPT_AES256_CBC
public static final ECryptoAlgorithmCrypt CRYPT_AES256_CBC
-
CRYPT_AES128_GCM
public static final ECryptoAlgorithmCrypt CRYPT_AES128_GCM
-
CRYPT_AES192_GCM
public static final ECryptoAlgorithmCrypt CRYPT_AES192_GCM
-
CRYPT_AES256_GCM
public static final ECryptoAlgorithmCrypt CRYPT_AES256_GCM
-
-
Method Detail
-
values
public static ECryptoAlgorithmCrypt[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ECryptoAlgorithmCrypt c : ECryptoAlgorithmCrypt.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ECryptoAlgorithmCrypt 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 nameNullPointerException- if the argument is null
-
getID
@Nonnull @Nonempty public String getID()
- Specified by:
getIDin interfacecom.helger.commons.id.IHasID<String>
-
getOID
@Nonnull public org.bouncycastle.asn1.ASN1ObjectIdentifier getOID()
- Specified by:
getOIDin interfaceICryptoAlgorithm- Returns:
- The ASN.1 object identifier of the crypto/sign algorithm. Never
null.
-
getFromIDOrNull
@Nullable public static ECryptoAlgorithmCrypt getFromIDOrNull(@Nullable String sID)
-
getFromIDOrThrow
@Nonnull public static ECryptoAlgorithmCrypt getFromIDOrThrow(@Nullable String sID)
-
getFromIDOrDefault
@Nullable public static ECryptoAlgorithmCrypt getFromIDOrDefault(@Nullable String sID, @Nullable ECryptoAlgorithmCrypt eDefault)
-
-