Enum CipherMode
- java.lang.Object
-
- java.lang.Enum<CipherMode>
-
- com.gitee.apanlh.util.algorithm.crypto.CipherMode
-
- All Implemented Interfaces:
Serializable,Comparable<CipherMode>
public enum CipherMode extends Enum<CipherMode>
加密器模式枚举类,用于表示加密器的操作模式,包括加密和解密
ENCRYPT:加密操作模式,用于加密数据
DECRYPT:解密操作模式,用于解密数据
加密器模式指定了加密器的具体操作,根据模式的不同,加密器可以用于加密或解密数据- Author:
- Pan
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetMode()获取类型值static CipherModevalueOf(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.
-
-
-
Enum Constant Detail
-
ENCRYPT
public static final CipherMode ENCRYPT
加密操作模式,用于加密数据
-
DECRYPT
public static final CipherMode DECRYPT
解密操作模式,用于解密数据
-
-
Method Detail
-
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(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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getMode
public int getMode()
获取类型值- Returns:
- int
-
-