public enum Algorithm extends Enum<Algorithm> implements Serializable
Enum Constant and Description |
---|
AES128 |
AES192 |
AES256 |
CAMELLIA128 |
CAMELLIA192 |
CAMELLIA256 |
EC |
RIPEMD160 |
RSA |
SHA256 |
SHA384 |
SHA512 |
TWOFISH128 |
TWOFISH192 |
TWOFISH256 |
Modifier and Type | Field and Description |
---|---|
static long |
serialVersionUID |
Modifier and Type | Method and Description |
---|---|
String |
getAlgorithmFamily()
The algorithm family.
|
static Algorithm[] |
getAlgorithms(AlgorithmType at)
Return a list of algorithms of the specified type.
|
AlgorithmType |
getAlgorithmType()
Get the type of algorithm.
|
int |
getBlockSize()
Get the default key size for this algorithm.
|
int |
getBlockSize(SecurityLevel sl)
Get the block size for this algorithm and security level.
|
static Algorithm |
getById(int id)
Look up an algorithm by id.
|
static Algorithm |
getByString(String s)
Look up an algorithm by its identification string.
|
static Algorithm |
getDefault(AlgorithmType at)
Look up the default algorithm to be used on the system.
|
int |
getId()
Look up the current id.
|
int |
getKeySize()
Get the default key size for this algorithm.
|
int |
getKeySize(SecurityLevel sl)
Get the key size for this algorithm and security level.
|
Map<SecurityLevel,AlgorithmParameter> |
getParameters()
Get a map of security levels and default parameters for this algorithm.
|
AlgorithmParameter |
getParameters(SecurityLevel sl)
Get default parameters for the security level specified.
|
String |
getProvider()
Get the provider string for this algorithm.
|
String |
toString()
Get the identification string.
|
static Algorithm |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Algorithm[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Algorithm AES128
public static final Algorithm AES192
public static final Algorithm AES256
public static final Algorithm CAMELLIA128
public static final Algorithm CAMELLIA192
public static final Algorithm CAMELLIA256
public static final Algorithm EC
public static final Algorithm RIPEMD160
public static final Algorithm RSA
public static final Algorithm SHA256
public static final Algorithm SHA384
public static final Algorithm SHA512
public static final Algorithm TWOFISH128
public static final Algorithm TWOFISH192
public static final Algorithm TWOFISH256
public static final long serialVersionUID
public static Algorithm[] values()
for (Algorithm c : Algorithm.values()) System.out.println(c);
public static Algorithm valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static Algorithm[] getAlgorithms(AlgorithmType at)
Return a list of algorithms of the specified type.
at
- the algorithm type to generate a list forpublic static Algorithm getById(int id)
Look up an algorithm by id.
id
- the idto be looked uppublic static Algorithm getByString(String s)
Look up an algorithm by its identification string.
The string search is case insensitive.
s
- the identification string to be looked uppublic static Algorithm getDefault(AlgorithmType at)
Look up the default algorithm to be used on the system.
at
- the type of algorithm to be looked forpublic int getId()
Look up the current id.
public String getAlgorithmFamily()
The algorithm family.
This is either the identification string without the key size or identical to the identification string
public String toString()
Get the identification string.
public AlgorithmType getAlgorithmType()
Get the type of algorithm.
public String getProvider()
Get the provider string for this algorithm.
public int getKeySize()
Get the default key size for this algorithm.
public int getKeySize(SecurityLevel sl)
Get the key size for this algorithm and security level.
sl
- the security levelpublic int getBlockSize()
Get the default key size for this algorithm.
public int getBlockSize(SecurityLevel sl)
Get the block size for this algorithm and security level.
sl
- the security levelpublic AlgorithmParameter getParameters(SecurityLevel sl)
Get default parameters for the security level specified.
sl
- the security levelpublic Map<SecurityLevel,AlgorithmParameter> getParameters()
Get a map of security levels and default parameters for this algorithm.
Copyright © 2023. All rights reserved.