-
Notifications
You must be signed in to change notification settings - Fork 209
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
Document decrypt function #321
Document decrypt function #321
Conversation
encryption.py
Outdated
>>> from cryptography.hazmat.primitives.serialization import load_pem_public_key | ||
>>> pkey = load_pem_public_key(open("server/pubkey.txt", "rb").read(), default_backend()) | ||
>>> message = b"Hello, world!" | ||
>>> encrypted = pkey.encrypt(message, padding.OAEP(padding.MGF1(hashes.SHA1()), hashes.SHA1(), None)) |
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.
travis is not happy with this line 😞
@xfix what is your motivation for this change? |
@davidak: Just documenting that function, as it is good programming practice. |
@xfix ah, i see. thought you add a function to decrypt a document. |
@davidak: This is essentially documenting usage of #227, contributed earlier. Essentially, it's to keep API keys secret, as they cannot be trusted to not be used to take over an account in a public repository. Public key to encrypt stuff can be downloaded from http://chaosthebot.com/pubkey.txt. |
🙅 PR rejected with a vote of 5 for and 0 against, with a weighted total of 5.0 and a threshold of 6.1. Open a new PR to restart voting. |
Just in case I've added documentation here: https://github.com/chaosbot/Chaos/wiki/Encryption |
No description provided.