Enum Class Algorithm
- All Implemented Interfaces:
Serializable,Comparable<Algorithm>,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionThe algorithm family.static Algorithm[]Return a list of algorithms of the specified type.Get the type of algorithm.intGet the default key size for this algorithm.intGet the block size for this algorithm and security level.static AlgorithmgetById(int id) Look up an algorithm by id.static AlgorithmLook up an algorithm by its identification string.static AlgorithmLook up the default algorithm to be used on the system.intgetId()Look up the current id.intGet the default key size for this algorithm.intGet the key size for this algorithm and security level.Get a map of security levels and default parameters for this algorithm.Get default parameters for the security level specified.Get the provider string for this algorithm.toString()Get the identification string.static AlgorithmReturns the enum constant of this class with the specified name.static Algorithm[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
AES128
-
AES192
-
AES256
-
CAMELLIA128
-
CAMELLIA192
-
CAMELLIA256
-
EC
-
RIPEMD160
-
RSA
-
SHA256
-
SHA384
-
SHA512
-
TWOFISH128
-
TWOFISH192
-
TWOFISH256
-
-
Field Details
-
serialVersionUID
public static final long serialVersionUID- See Also:
-
-
Method Details
-
values
Returns 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
-
valueOf
Returns 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 nameNullPointerException- if the argument is null
-
getAlgorithms
Return a list of algorithms of the specified type.
- Parameters:
at- the algorithm type to generate a list for- Returns:
- the list of algorithms
-
getById
Look up an algorithm by id.
- Parameters:
id- the idto be looked up- Returns:
- the algorithm or null if not known
-
getByString
Look up an algorithm by its identification string.
The string search is case insensitive.
- Parameters:
s- the identification string to be looked up- Returns:
- the algorithm or null if not found
-
getDefault
Look up the default algorithm to be used on the system.
- Parameters:
at- the type of algorithm to be looked for- Returns:
- the default type
-
getId
public int getId()Look up the current id.
- Returns:
- the current id
-
getAlgorithmFamily
The algorithm family.
This is either the identification string without the key size or identical to the identification string
- Returns:
- the identification string without key size (if any)
-
toString
Get the identification string.
-
getAlgorithmType
Get the type of algorithm.
- Returns:
- the type of algorithm
-
getProvider
Get the provider string for this algorithm.
- Returns:
- the provider string for this algorithm
-
getKeySize
public int getKeySize()Get the default key size for this algorithm.
- Returns:
- the default key size in bits
-
getKeySize
Get the key size for this algorithm and security level.
- Parameters:
sl- the security level- Returns:
- the key size in bits for the security level specified
-
getBlockSize
public int getBlockSize()Get the default key size for this algorithm.
- Returns:
- the default key size in bits
-
getBlockSize
Get the block size for this algorithm and security level.
- Parameters:
sl- the security level- Returns:
- the key size in bits for the security level specified or -1 if not set
-
getParameters
Get default parameters for the security level specified.
- Parameters:
sl- the security level- Returns:
- the default set of parameters for the security level specified
-
getParameters
Get a map of security levels and default parameters for this algorithm.
- Returns:
- The map containing the default parameters
-