- All Implemented Interfaces:
Serializable
,Comparable<Mode>
,Constable
The enum
Mode
defines the names that can be specified as the mode component in a transformation
when requesting an instance of Cipher.
For more info see:
https://docs.oracle.com/en/java/javase/11/docs/specs/security/standard-names.html#cipher-algorithm-modes-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe BC mode that represents the Block Chaining ModeThe CBC operation mode that represents the Cipher Block Chaining Mode, as defined in FIPS PUB 81.The CCM operation mode that represents the Counter/CBC Mode, as defined in NIST Special Publication SP 800-38DThe CFB operation mode that represents the Cipher Block Feedback Mode, as defined in FIPS PUB 81The CFBx operation mode that represents the Cipher Block Feedback Mode, as defined in FIPS PUB 81The CTR operation mode that represents a simplification of OFB, Counter mode updates the input block as a counter.The CTS operation mode that represents the Cipher Text Stealing, as described in Bruce Schneier’s book Applied Cryptography-Second Edition, John Wiley and Sons, 1996The ECB operation mode that represents the Electronic Codebook Mode, as defined in FIPS PUB 81 (generally this mode should not be used for multiple blocks of data).The GCM operation mode that represents the Galois/Counter Mode, as defined in NIST Special Publication SP 800-38DThe OFB operation mode that represents the Output Feedback Mode, as defined in FIPS PUB 81 Using modes such as CFB and OFB, block ciphers can encrypt data in units smaller than the cipher’s actual block size.The OFBx operation mode that represents the Output Feedback Mode, as defined in FIPS PUB 81 Using modes such as CFB and OFB, block ciphers can encrypt data in units smaller than the cipher’s actual block size.The PCBC operation mode that represents the Propagating Cipher Block Chaining Mode, as defined in FIPS PUB 81The enum constant 'UNKNOWN' if the mode is unknown -
Method Summary
-
Enum Constant Details
-
BC
The BC mode that represents the Block Chaining Mode -
CBC
The CBC operation mode that represents the Cipher Block Chaining Mode, as defined in FIPS PUB 81. Using modes such as CFB and OFB, block ciphers can encrypt data in units smaller than the cipher’s actual block size. When requesting such a mode, you may optionally specify the number of bits to be processed at a time by appending this number to the mode name as shown in the “DES/CFB8/NoPadding” and “DES/OFB32/PKCS5Padding” transformations. If no such number is specified, a provider-specific default is used. (For example, the SunJCE provider uses a default of 64 bits for DES.) Thus, block ciphers can be turned into byte-oriented stream ciphers by using an 8-bit mode such as CFB8 or OFB8. -
CCM
The CCM operation mode that represents the Counter/CBC Mode, as defined in NIST Special Publication SP 800-38D -
CFB
The CFB operation mode that represents the Cipher Block Feedback Mode, as defined in FIPS PUB 81 -
CFBx
The CFBx operation mode that represents the Cipher Block Feedback Mode, as defined in FIPS PUB 81 -
CTR
The CTR operation mode that represents a simplification of OFB, Counter mode updates the input block as a counter. -
CTS
The CTS operation mode that represents the Cipher Text Stealing, as described in Bruce Schneier’s book Applied Cryptography-Second Edition, John Wiley and Sons, 1996 -
ECB
The ECB operation mode that represents the Electronic Codebook Mode, as defined in FIPS PUB 81 (generally this mode should not be used for multiple blocks of data). -
GCM
The GCM operation mode that represents the Galois/Counter Mode, as defined in NIST Special Publication SP 800-38D -
OFB
The OFB operation mode that represents the Output Feedback Mode, as defined in FIPS PUB 81 Using modes such as CFB and OFB, block ciphers can encrypt data in units smaller than the cipher’s actual block size. When requesting such a mode, you may optionally specify the number of bits to be processed at a time by appending this number to the mode name as shown in the “DES/CFB8/NoPadding” and “DES/OFB32/PKCS5Padding” transformations. If no such number is specified, a provider-specific default is used. (For example, the SunJCE provider uses a default of 64 bits for DES.) Thus, block ciphers can be turned into byte-oriented stream ciphers by using an 8-bit mode such as CFB8 or OFB8. -
OFBx
The OFBx operation mode that represents the Output Feedback Mode, as defined in FIPS PUB 81 Using modes such as CFB and OFB, block ciphers can encrypt data in units smaller than the cipher’s actual block size. When requesting such a mode, you may optionally specify the number of bits to be processed at a time by appending this number to the mode name as shown in the “DES/CFB8/NoPadding” and “DES/OFB32/PKCS5Padding” transformations. If no such number is specified, a provider-specific default is used. (For example, the SunJCE provider uses a default of 64 bits for DES.) Thus, block ciphers can be turned into byte-oriented stream ciphers by using an 8-bit mode such as CFB8 or OFB8. -
PCBC
The PCBC operation mode that represents the Propagating Cipher Block Chaining Mode, as defined in FIPS PUB 81 -
UNKNOWN
The enum constant 'UNKNOWN' if the mode is unknown
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-