public enum CommitmentPolicy extends Enum<CommitmentPolicy>
Enum Constant and Description |
---|
ForbidEncryptAllowDecrypt
On encrypty, algorithm suite must NOT support key commitment; On decrypt, if a key commitment
is present on the ciphertext, then the key commitment must be valid.
|
RequireEncryptAllowDecrypt
On encrypt, algorithm suite must support key commitment; On decrypt, if a key commitment is
present on the ciphertext, then the key commitment must be valid.
|
RequireEncryptRequireDecrypt
Algorithm suite must support key commitment.
|
Modifier and Type | Method and Description |
---|---|
boolean |
algorithmAllowedForDecrypt(CryptoAlgorithm algorithm)
Validates that an algorithm meets the Policy's On decrypt key commitment.
|
boolean |
algorithmAllowedForEncrypt(CryptoAlgorithm algorithm)
Validates that an algorithm meets the Policy's On encrypt key commitment.
|
static CommitmentPolicy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CommitmentPolicy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CommitmentPolicy ForbidEncryptAllowDecrypt
public static final CommitmentPolicy RequireEncryptAllowDecrypt
public static final CommitmentPolicy RequireEncryptRequireDecrypt
public static CommitmentPolicy[] values()
for (CommitmentPolicy c : CommitmentPolicy.values()) System.out.println(c);
public static CommitmentPolicy valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean algorithmAllowedForEncrypt(CryptoAlgorithm algorithm)
public boolean algorithmAllowedForDecrypt(CryptoAlgorithm algorithm)
Copyright © 2023. All rights reserved.