public enum EncType extends Enum<EncType>
Enum Constant and Description |
---|
EC_P256
Pubkey 64 bytes; privkey 32 bytes;
|
EC_P384
Pubkey 96 bytes; privkey 48 bytes;
|
EC_P521
Pubkey 132 bytes; privkey 66 bytes;
|
ELGAMAL_2048
2048-bit MODP Group from RFC 3526.
|
Modifier and Type | Method and Description |
---|---|
String |
getAlgorithmName()
the standard name used for the Java crypto factories
|
EncAlgo |
getBaseAlgorithm()
the standard base algorithm name used for the Java crypto factories
|
static EncType |
getByCode(int code) |
int |
getCode()
the unique identifier for this type
|
AlgorithmParameterSpec |
getParams()
The elliptic curve ECParameterSpec for ECDSA; DSAParameterSpec for DSA
|
int |
getPrivkeyLen()
the length of the private key, in bytes
|
int |
getPubkeyLen()
the length of the public key, in bytes
|
String |
getSupportedSince()
The router version in which this type was first supported.
|
boolean |
isAvailable() |
static boolean |
isAvailable(int code) |
static boolean |
isAvailable(String stype) |
static EncType |
parseEncType(String stype)
Convenience for user apps
|
static EncType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static EncType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final EncType ELGAMAL_2048
public static final EncType EC_P256
public static final EncType EC_P384
public static final EncType EC_P521
public static EncType[] values()
for (EncType c : EncType.values()) System.out.println(c);
public static EncType 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 int getCode()
public int getPubkeyLen()
public int getPrivkeyLen()
public EncAlgo getBaseAlgorithm()
public String getAlgorithmName()
public AlgorithmParameterSpec getParams() throws InvalidParameterSpecException
InvalidParameterSpecException
- if the algorithm is not available on this JVM.public String getSupportedSince()
public boolean isAvailable()
public static boolean isAvailable(int code)
public static boolean isAvailable(String stype)
stype
- number or namepublic static EncType getByCode(int code)