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
Get rid of pycrypto #347
Get rid of pycrypto #347
Conversation
dd8f00d
to
5becf27
Compare
* Use cryptography package instaed * Update piplock.file to be sync with new dependencies
f35c4f0
to
c8d3dcd
Compare
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.
afaik those changes may corrupt stability/HA of the ETCD storage, i prefer to find way, that can provide full concept of HA/Scalability arch
|
||
def _unpad(self, s): | ||
return s[:-ord(s[len(s) - 1:])] | ||
key = hashlib.md5(key.encode('utf-8')).hexdigest() |
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.
Why changed sha256 to md5?
@@ -110,11 +109,11 @@ def validate(self): | |||
""" | |||
return True | |||
|
|||
def _get_encryption_key(self): | |||
"""Read encryption key and format it. | |||
def _get_fernet_obj(self): |
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.
You may use AES instead of Fernet to be compatible with old database.
https://cryptography.io/en/latest/hazmat/primitives/symmetric-encryption/
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.
thanks, I'll take a look
No description provided.