Skip to content
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

fix: Encrypt name to result #211

Merged
merged 1 commit into from
Sep 16, 2019
Merged

Conversation

seebees
Copy link
Contributor

@seebees seebees commented Sep 16, 2019

Javascript stimulates named parameters with objects.
The previous version used ciphertext to denote
the usable result from a call to encrypt.
However, this caused some cogitative load.
Ciphertext is used to denote encrypted data,
however the result of a call to encrypt in not only encrypted data.
The AWS Encryption SDK uses envelop encryption,
so the result of a call to encrypt include not only the encrypted data,
but also, the encrypted data keys, metadata, and the encryption context.
By returning both the messageHeader and the ciphertext
users are confused about what exactly was in ciphertext.
This is compounded by returning messageHeader
which is just a parsed version of the header
that is already returned by the result of encrypt

The named parameter is now call result.
This makes it clear that this is the important return value from encrypt
that is the only value needed for decrypt.

This change is only merged without a major version bumb
because the project is still in bets.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Check any applicable:

  • Were any files moved? Moving files changes their URL, which breaks all hyperlinks to the files.

Javascript stimulates named parameters with objects.
The previous version used `ciphertext` to denote
the usable result from a call to `encrypt`.
However, this caused some cogitative load.
Ciphertext is used to denote encrypted data,
however the result of a call to `encrypt` in not _only_ encrypted data.
The AWS Encryption SDK uses envelop encryption,
so the result of a call to `encrypt` include not only the encrypted data,
but also, the encrypted data keys, metadata, and the encryption context.
By returning both the `messageHeader` *and* the `ciphertext`
users are confused about what exactly was *in* `ciphertext`.
This is compounded by returning `messageHeader`
which is just a parsed version of the header
that is already returned by the result of `encrypt`

The named parameter is now call `result`.
This makes it clear that this is the important return value from `encrypt`
that is the only value needed for `decrypt`.
@seebees seebees requested a review from a team September 16, 2019 16:35
@seebees seebees merged commit 03061d1 into aws:master Sep 16, 2019
@seebees seebees deleted the ciphertest_to_result branch September 16, 2019 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants