Package com.saperion.common.crypto
Enum Class CipherStrategy
- All Implemented Interfaces:
- Serializable,- Comparable<CipherStrategy>,- Constable
 CipherStrategy enumerates the few strategies for a Cipher used by SAPERION.
 
It defines the encryption algorithm, block mode, padding type and key size to use.
 If a new strategy is really needed, a new entry must be made and a new corresponding Cipher-implementation
 must be provided.
 
- Author:
- agz
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum Constants
- 
Method SummaryModifier and TypeMethodDescriptionReturns the name of the encryption algorithm of thisCipherStrategy.intReturns the key size (number of bits) of thisCipherStrategy.getMode()Returns the name of the mode of thisCipherStrategy.Returns the name of the padding of thisCipherStrategy.static CipherStrategyReturns the enum constant of this class with the specified name.static CipherStrategy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
- 
Enum Constant Details- 
AES_128Algorithm = "AES" Mode = "CBC" Padding = "PKCS5Padding" KeySize = 128
- 
RSA_2048Algorithm = "RSA" Mode = "ECB" Padding = "PKCS1Padding" KeySize = 2048
 
- 
- 
Method Details- 
valuesReturns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
 
- 
valueOfReturns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
- NullPointerException- if the argument is null
 
- 
getAlgorithmReturns the name of the encryption algorithm of thisCipherStrategy.- Returns:
- the encryption algorithm
 
- 
getModeReturns the name of the mode of thisCipherStrategy.- Returns:
- the mode
 
- 
getPaddingReturns the name of the padding of thisCipherStrategy.- Returns:
- the padding
 
- 
getKeySizepublic int getKeySize()Returns the key size (number of bits) of thisCipherStrategy.- Returns:
- the key size
 
 
-