-
Notifications
You must be signed in to change notification settings - Fork 123
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
Implement support for cryptography api #719
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: KentHsu <chiahaohsu9@gmail.com>
Signed-off-by: KentHsu <chiahaohsu9@gmail.com>
Signed-off-by: KentHsu <chiahaohsu9@gmail.com>
Thank you very much for the PR Kent, I'll try to get to it asap. |
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.
Awesome PR. Thanks @KentHsu
Can you run tox -e flake8
and tox -e ruff
please?
The linter is failing at the moment.
That step runs tox -e flake8
, tox -e type
, tox -e mypy
and tox -e ruff
.
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.
Great PR @KentHsu, thank you! I have just a few nits.
# assert | ||
self.assertEqual(req.__class__, api_v1.EncryptRequest) | ||
self.assertEqual(req.payload.data, b'hello dapr') | ||
self.assertEqual(req.payload.seq, 0) |
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.
Can we also test the rasing of StopIteration after the appropriate number of iterations, for larger (and empty) files? Same for the async version.
EncryptDecryptFile(dapr) | ||
|
||
|
||
def EncryptDecryptString(dapr: DaprClient): |
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.
A nit: let's rename to encrypt_decrypt_string
and encrypt_decrypt_file
, to follow the PEP 8 style guide.
== APP == Running encrypt/decrypt operation on file | ||
== APP == Wrote encrypted data to encrypted.out | ||
== APP == Wrote decrypted data to decrypted.out.jpg | ||
``` |
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.
Please clean up the created resources in the end (the keys
directory that was created and the .out
files).
Description
Implement below in Dapr gRPC client
Implement below in Dapr gRPC aio client
Add cryptography examples follow go-sdk crypto example
Issue reference
Please reference the issue this PR will close: #548
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: