org.keyczar.enums
Enum CipherMode
java.lang.Object
java.lang.Enum<CipherMode>
org.keyczar.enums.CipherMode
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<CipherMode>
public enum CipherMode
- extends java.lang.Enum<CipherMode>
Encodes different modes of operation:
Cipher Block Chaining (CBC) with initial value (IV)
Counter (CTR) with IV
Electronic Code Book (ECB), no IV
DET-CBC, CBC without IV
- Author:
- steveweis@gmail.com (Steve Weis)
Method Summary |
java.lang.String |
getMode()
|
int |
getOutputSize(int blockSize,
int inputLength)
|
static CipherMode |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static CipherMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared. |
Methods inherited from class java.lang.Enum |
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
CBC
public static final CipherMode CBC
CTR
public static final CipherMode CTR
ECB
public static final CipherMode ECB
DET_CBC
public static final CipherMode DET_CBC
values
public static CipherMode[] 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 (CipherMode c : CipherMode.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static CipherMode 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 name
java.lang.NullPointerException
- if the argument is null
getMode
public java.lang.String getMode()
getOutputSize
public int getOutputSize(int blockSize,
int inputLength)