GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — docs(CommitmentPolicy): Detail Commitment Policy on Enum (#913) · aws/aws-encryption-sdk-java@753bf7d

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • src/main/java/com/amazonaws/encryptionsdk
    • CommitmentPolicy.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/main/java/com/amazonaws/encryptionsdk/CommitmentPolicy.java‎

Copy file name to clipboardExpand all lines: src/main/java/com/amazonaws/encryptionsdk/CommitmentPolicy.java
+20Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,30 @@
33

44
package com.amazonaws.encryptionsdk;
55

6+
/**
7+
* Governs how a AwsCrypto behaves during configuration, encryption, and decryption, with respect to
8+
* key commitment.
9+
*/
610
public enum CommitmentPolicy {
11+
/**
12+
* On encrypty, algorithm suite must NOT support key commitment; On decrypt, if a key commitment
13+
* is present on the ciphertext, then the key commitment must be valid. Key commitment will NOT be
14+
* included in ciphertext on encrypt.
15+
*/
716
ForbidEncryptAllowDecrypt,
17+
/**
18+
* On encrypt, algorithm suite must support key commitment; On decrypt, if a key commitment is
19+
* present on the ciphertext, then the key commitment must be valid. Key commitment will be
20+
* included in ciphertext on encrypt.
21+
*/
822
RequireEncryptAllowDecrypt,
23+
/**
24+
* Algorithm suite must support key commitment. Key commitment will be included in ciphertext on
25+
* encrypt. Valid key commitment must be present in ciphertext on decrypt.
26+
*/
927
RequireEncryptRequireDecrypt;
1028

29+
/** Validates that an algorithm meets the Policy's On encrypt key commitment. */
1130
public boolean algorithmAllowedForEncrypt(CryptoAlgorithm algorithm) {
1231
switch (this) {
1332
case ForbidEncryptAllowDecrypt:
@@ -21,6 +40,7 @@ public boolean algorithmAllowedForEncrypt(CryptoAlgorithm algorithm) {
2140
}
2241
}
2342

43+
/** Validates that an algorithm meets the Policy's On decrypt key commitment. */
2444
public boolean algorithmAllowedForDecrypt(CryptoAlgorithm algorithm) {
2545
switch (this) {
2646
case ForbidEncryptAllowDecrypt:

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.