Enum RSAKeySize
- java.lang.Object
-
- java.lang.Enum<RSAKeySize>
-
- com.academy.stratum.crypto.api.encryption.algorithms.asymmetric.rsa.RSAKeySize
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<RSAKeySize>
public enum RSAKeySize extends java.lang.Enum<RSAKeySize>
RSA key size enumerator- Author:
- Ruslan Nazirov
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getValue()
Get key sizestatic RSAKeySize
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static RSAKeySize[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
RSA1024
public static final RSAKeySize RSA1024
1024-bytes key
-
RSA2048
public static final RSAKeySize RSA2048
2048-bytes key [Preffered]
-
RSA4096
public static final RSAKeySize RSA4096
4096-bytes key [Can be slow]
-
RSA8192
public static final RSAKeySize RSA8192
8192-bytes key [Even slower]
-
-
Method Detail
-
values
public static RSAKeySize[] 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 (RSAKeySize c : RSAKeySize.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static RSAKeySize valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getValue
public int getValue()
Get key size- Returns:
- keySize Key size
-
-