-
Notifications
You must be signed in to change notification settings - Fork 122
Flag deprecated encryptString/decryptString APIs as deprecated. #120
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
Conversation
* Add @deprecated to deprecated APIs * Update Javadoc about deprecation * Opportunistic improvement of incomplete Javadoc on decryptData()
Per feedback from @juneb
@@ -281,7 +281,12 @@ public long estimateCiphertextSize( | |||
/** | |||
* Calls {@link #encryptData(MasterKeyProvider, byte[], Map)} on the UTF-8 encoded bytes of | |||
* {@code plaintext} and base64 encodes the result. | |||
* @deprecated Use the {@link #encryptData(MasterKeyProvider, byte[], Map)} and | |||
* {@link #decryptData(MasterKeyProvider, byte[])} APIs instead. {@code encryptString} is incompatible with the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not say that they are incompatible without clarification. Maybe "because the the output must be base64-decoded to be compatible with other AWS Encryption SDK implementations"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me, I am but a deprecation-shaped vessel for the wordsmithing that you guys think make sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because these APIs return Base64-encoded output, they are not compatible with other AWS Encryption SDK language implementations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because these APIs return Base64-encoded output, they are not compatible with other AWS Encryption SDK language implementations.
IMO this still conveys the wrong message.
What I would like to make sure we're communicating is that they are compatible, but only once you peal away an extra layer of encoding that this method adds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After some noodling, I've tried again to be clear and concise in explaining that this is deprecated, and why. When you have a second, please let me know what you think of the new wording.
@lizroth We should also add the deprecation message to the example that demonstrates how to use the encryptString and decryptString methods, or remove them. |
Agreed. Removed the example. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:D
Removing example code for deprecated functions. Original commit got lost in PR cleanup.
Issue #, if available: n/a
Description of changes:
@Deprecated
to deprecated APIsBackground: the
encryptString
/decryptString
APIs were an early approach to try to provide helpful encoding for string ciphertexts. However, the AWS Encryption SDKs in general attempt to be agnostic as to the data format that users want to use for their ciphertexts, so over the longer term these APIs have turned out to be more confusing than beneficial for customers. As such, most Encryption SDKs do not support these APIs by design.Only the Java ESDK has these APIs, because Java was the original implementation, and at the time it was a more significant convenience improvement to offer these APIs to Java developers.
This PR deprecates those APIs to make it clear to our users which APIs are interoperable and to encourage our users to prefer the ones that are.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Check any applicable: