|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<PaddingScheme> org.apache.shiro.crypto.PaddingScheme
public enum PaddingScheme
A CipherPaddingScheme
represents well-known
padding schemes supported by JPA providers in a
type-safe manner.
Enum Constant Summary | |
---|---|
ISO10126
Padding scheme as defined in the W3C's "XML Encryption Syntax and Processing" document, Section 5.2 - Block Encryption Algorithms. |
|
NONE
No padding. |
|
OAEP
Optimal Asymmetric Encryption Padding defined in RSA's PKSC#1 standard (aka RFC 3447). |
|
OAEPWithMd5AndMgf1
Optimal Asymmetric Encryption Padding with MD5 message digest and MGF1 mask generation function. |
|
OAEPWithSha1AndMgf1
Optimal Asymmetric Encryption Padding with SHA-1 message digest and MGF1 mask generation function. |
|
OAEPWithSha256AndMgf1
Optimal Asymmetric Encryption Padding with SHA-256 message digest and MGF1 mask generation function. |
|
OAEPWithSha384AndMgf1
Optimal Asymmetric Encryption Padding with SHA-384 message digest and MGF1 mask generation function. |
|
OAEPWithSha512AndMgf1
Optimal Asymmetric Encryption Padding with SHA-512 message digest and MGF1 mask generation function. |
|
PKCS1
Padding scheme used with the RSA algorithm defined in RSA's
PKSC#1 standard (aka
RFC 3447). |
|
PKCS5
Padding scheme defined in RSA's Password-Based Cryptography Standard. |
|
SSL3
Padding scheme defined in the SSL 3.0 specification, section 5.2.3.2 (CBC block cipher) . |
Method Summary | |
---|---|
String |
getTransformationName()
Returns the actual string name to use when building the Cipher
transformation string . |
static PaddingScheme |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static PaddingScheme[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final PaddingScheme NONE
public static final PaddingScheme ISO10126
public static final PaddingScheme OAEP
Cipher
instances with a
OAEPParameterSpec
object which provides the 1) message digest and
2) mask generation function to use for the scheme.
OAEPParameterSpec
object. This is
often unnecessary, because most combinations are fairly standard. These common combinations are pre-defined
in this enum in the OAEP
* variants.
If you find that these common combinations still do not meet your needs, then you will need to
specify your own message digest and mask generation function, either as an OAEPParameterSpec
object
during Cipher initialization or, maybe more easily, in the scheme name directly. If you want to use scheme name
approach, the name format is specified in the
Standard Names
document in the Cipher Algorithm Padding
section.
OAEPWithMd5AndMgf1
,
OAEPWithSha1AndMgf1
,
OAEPWithSha256AndMgf1
,
OAEPWithSha384AndMgf1
,
OAEPWithSha512AndMgf1
public static final PaddingScheme OAEPWithMd5AndMgf1
MD5
message digest and MGF1
mask generation function.
This is a convenient pre-defined OAEP padding scheme that embeds the message digest and mask generation function.
When using this padding scheme, there is no need to init the Cipher
instance with an
OAEPParameterSpec
object, as it is already 'built in' to the scheme
name (unlike the OAEP
scheme, which requires a bit more work).
public static final PaddingScheme OAEPWithSha1AndMgf1
SHA-1
message digest and MGF1
mask generation function.
This is a convenient pre-defined OAEP padding scheme that embeds the message digest and mask generation function.
When using this padding scheme, there is no need to init the Cipher
instance with an
OAEPParameterSpec
object, as it is already 'built in' to the scheme
name (unlike the OAEP
scheme, which requires a bit more work).
public static final PaddingScheme OAEPWithSha256AndMgf1
SHA-256
message digest and MGF1
mask generation function.
This is a convenient pre-defined OAEP padding scheme that embeds the message digest and mask generation function.
When using this padding scheme, there is no need to init the Cipher
instance with an
OAEPParameterSpec
object, as it is already 'built in' to the scheme
name (unlike the OAEP
scheme, which requires a bit more work).
public static final PaddingScheme OAEPWithSha384AndMgf1
SHA-384
message digest and MGF1
mask generation function.
This is a convenient pre-defined OAEP padding scheme that embeds the message digest and mask generation function.
When using this padding scheme, there is no need to init the Cipher
instance with an
OAEPParameterSpec
object, as it is already 'built in' to the scheme
name (unlike the OAEP
scheme, which requires a bit more work).
public static final PaddingScheme OAEPWithSha512AndMgf1
SHA-512
message digest and MGF1
mask generation function.
This is a convenient pre-defined OAEP padding scheme that embeds the message digest and mask generation function.
When using this padding scheme, there is no need to init the Cipher
instance with an
OAEPParameterSpec
object, as it is already 'built in' to the scheme
name (unlike the OAEP
scheme, which requires a bit more work).
public static final PaddingScheme PKCS1
RSA
algorithm defined in RSA's
PKSC#1 standard (aka
RFC 3447).
public static final PaddingScheme PKCS5
public static final PaddingScheme SSL3
5.2.3.2 (CBC block cipher)
.
Method Detail |
---|
public static PaddingScheme[] values()
for (PaddingScheme c : PaddingScheme.values()) System.out.println(c);
public static PaddingScheme valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic String getTransformationName()
Cipher
transformation string
.
Cipher
transformation string
.Cipher.getInstance(String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |