public static enum SignatureTypes.State extends java.lang.Enum<SignatureTypes.State>
SignatureTypes
(signature
profiles). Signature types can be enabled ("on"), can be set to support
signature only ("sign_only"), to verification only ("verify_only") or can
be disabled ("off" or any other value not covered by other enum values).Enum Constant and Description |
---|
OFF
Disables a signature profile.
|
ON
Enables a signature profile.
|
SIGN_ONLY
Allows the signature profile to be used for signature but not for
verification.
|
VERIFY_ONLY
Restricts the signature profile so that is can only be used for
verification purposes and not for signature.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canSign()
Returns if the respective state allows signatures.
|
boolean |
canVerify()
Returns if the respective state allows verification.
|
static SignatureTypes.State |
fromString(java.lang.String keyWord)
Returns a valid State from a given
keyWord . |
boolean |
in(SignatureTypes.State... states)
Returns
true when the current state is one of the given
candidate states . |
static SignatureTypes.State |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static SignatureTypes.State[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SignatureTypes.State ON
public static final SignatureTypes.State OFF
public static final SignatureTypes.State VERIFY_ONLY
public static final SignatureTypes.State SIGN_ONLY
public static SignatureTypes.State[] values()
for (SignatureTypes.State c : SignatureTypes.State.values()) System.out.println(c);
public static SignatureTypes.State valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified namejava.lang.NullPointerException
- if the argument is nullpublic static SignatureTypes.State fromString(java.lang.String keyWord)
keyWord
. If the
keyWord
cannot be matched to a certain state, the default
State OFF
is returned.keyWord
- A valid keyword like "on", "sign_only"...public boolean in(SignatureTypes.State... states)
true
when the current state is one of the given
candidate states
.states
- The candidate states.true
when the current state is one of the given
candidate states, false
if not.public boolean canSign()
true
if signatures are allowed, false
if not.public boolean canVerify()
true
if verification is allowed, false
if
not.