-
Notifications
You must be signed in to change notification settings - Fork 2.1k
More Changes for api review #27095
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More Changes for api review #27095
Changes from all commits
0ddd051
db49e5e
1d67ed8
aa91172
d5e5b0a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,16 +11,16 @@ | |
| * Represents the encryption algorithms supported for key encryption. | ||
| * | ||
| */ | ||
| public enum KeyEncryptionKeyAlgorithm { | ||
| public enum KeyEncryptionAlgorithm { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought we decided to update the implementation class's name and not the public one. But I think that is fine, once the cryptography jars release to maven, then we can just use them without having to update our code.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes I am avoiding any code change in shaded code |
||
| /** | ||
| * RSA public key cryptography algorithm with Optimal Asymmetric Encryption Padding (OAEP) padding. | ||
| */ | ||
| RSA_OAEP("RSA_OAEP"); | ||
|
|
||
| private final String keyEncryptionKeyAlgorithmName; | ||
| private static final Map<String, KeyEncryptionKeyAlgorithm> ENUM_MAP; | ||
| private static final Map<String, KeyEncryptionAlgorithm> ENUM_MAP; | ||
|
|
||
| KeyEncryptionKeyAlgorithm(String keyEncryptionKeyAlgorithmName) { | ||
| KeyEncryptionAlgorithm(String keyEncryptionKeyAlgorithmName) { | ||
| this.keyEncryptionKeyAlgorithmName = keyEncryptionKeyAlgorithmName; | ||
| } | ||
|
|
||
|
|
@@ -45,19 +45,19 @@ public String getName() { | |
| // Any Map impl can be used. | ||
|
|
||
| static { | ||
| Map<String, KeyEncryptionKeyAlgorithm> map = new ConcurrentHashMap<>(); | ||
| for (KeyEncryptionKeyAlgorithm instance : KeyEncryptionKeyAlgorithm.values()) { | ||
| Map<String, KeyEncryptionAlgorithm> map = new ConcurrentHashMap<>(); | ||
| for (KeyEncryptionAlgorithm instance : KeyEncryptionAlgorithm.values()) { | ||
| map.put(instance.getName(), instance); | ||
| } | ||
| ENUM_MAP = Collections.unmodifiableMap(map); | ||
| } | ||
|
|
||
| /** | ||
| * Gets the KeyEncryptionKeyAlgorithm enum back from the string value | ||
| * Gets the KeyEncryptionAlgorithm enum back from the string value | ||
| * @param name the string value | ||
| * @return KeyEncryptionKeyAlgorithm enum | ||
| * @return KeyEncryptionAlgorithm enum | ||
| */ | ||
| public static KeyEncryptionKeyAlgorithm get(String name) { | ||
| public static KeyEncryptionAlgorithm get(String name) { | ||
| return ENUM_MAP.get(name); | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.