-
Notifications
You must be signed in to change notification settings - Fork 1k
Update Cloud KMS samples #1100
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
Update Cloud KMS samples #1100
Conversation
b4db29b to
52cc6e5
Compare
| ) { | ||
| // PHP has limited support for asymmetric encryption operations. | ||
| // Specifically, openssl_public_encrypt() does not allow customizing | ||
| // algorithms or padding. Thus, it is not currently possible to use PHP |
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.
This is confusing to me... does KMS require custom algorithms?
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.
Talked on chat. I'm open to other words here.
| private static function runSampleFile($sampleFile, $sampleName, $params = []) | ||
| { | ||
| $sampleFile = __DIR__ . sprintf('/../src/%s', $sampleFile); | ||
| $sampleName = str_replace('_sample', '', $sampleName) . '_sample'; |
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.
What is the purpose of this? As far as I can tell, _sample is never used in the sample name parameter
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.
This entire function is never called directly (only runSample). It's a lower-level API that someone can call when the name of the file doesn't match the name of the sample.
dwsupplee
left a comment
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.
These looks really nice @sethvargo, nice work.
6e530cf to
cef66da
Compare
cef66da to
08e0ede
Compare
08e0ede to
72b93b8
Compare
This updates the Cloud KMS samples to match the other languages (sans Ruby and Python which are still on my list). It uses the new sample format Brent and I discussed on chat.