Package com.pdftools.crypto
Enum SignaturePaddingType
- java.lang.Object
-
- java.lang.Enum<SignaturePaddingType>
-
- com.pdftools.crypto.SignaturePaddingType
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<SignaturePaddingType>
public enum SignaturePaddingType extends java.lang.Enum<SignaturePaddingType>
Padding scheme of the cryptographic signature algorithm
The signature algorithm is defined by the signing certificate's key type. For example, RSA or ECDSA. For some keys, e.g. RSA keys, there are different padding algorithms. Some cryptographic providers let you set this padding algorithm. However, this only has an effect on signatures created by the cryptographic provider itself. All signed data acquired from external sources may use other signing algorithms; more specifically, the issuer certificates of the trust chain, the time-stamp’s signature, or those used for the revocation information (CRL, OCSP). It is recommended to verify that the algorithms of all signatures provide a similar level of security.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DEFAULT
Default padding schemeRSA_RSA
RSA with PKCS#1 padding schemeRSA_SSA_PSS
RSA with Probabilistic Signature Scheme (PSS)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SignaturePaddingType
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static SignaturePaddingType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DEFAULT
public static final SignaturePaddingType DEFAULT
Default padding scheme
The default padding scheme. Used for theSignatureAlgorithm.ECDSA
signature algorithm.
-
RSA_RSA
public static final SignaturePaddingType RSA_RSA
RSA with PKCS#1 padding scheme
Padding scheme for RSA keys that corresponds to theSignatureAlgorithm.RSA_RSA
signature algorithm.
-
RSA_SSA_PSS
public static final SignaturePaddingType RSA_SSA_PSS
RSA with Probabilistic Signature Scheme (PSS)
Padding scheme for RSA keys that corresponds to theSignatureAlgorithm.RSA_SSA_PSS
signature algorithm.
-
-
Method Detail
-
values
public static SignaturePaddingType[] 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 (SignaturePaddingType c : SignaturePaddingType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static SignaturePaddingType 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
-
-