diff options
author | drebs <drebs@leap.se> | 2014-11-28 11:41:25 -0200 |
---|---|---|
committer | drebs <drebs@leap.se> | 2014-12-05 11:41:07 -0200 |
commit | b761bfc3f95bc87461c8cc8ec8462b1a995ebddb (patch) | |
tree | 3e91227b1e0c4168683599b8048da50b3ac9cf97 /common | |
parent | aafa79c0f5e3d05c28d8f41804ae692931e67d7e (diff) |
Refactor client crypto for better code readability.
Diffstat (limited to 'common')
-rw-r--r-- | common/src/leap/soledad/common/crypto.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/common/src/leap/soledad/common/crypto.py b/common/src/leap/soledad/common/crypto.py index 56bb608a..ab05999b 100644 --- a/common/src/leap/soledad/common/crypto.py +++ b/common/src/leap/soledad/common/crypto.py @@ -42,6 +42,22 @@ class UnknownEncryptionScheme(Exception): pass +class EncryptionMethods(object): + """ + Representation of encryption methods that can be used. + """ + + AES_256_CTR = 'aes-256-ctr' + XSALSA20 = 'xsalsa20' + + +class UnknownEncryptionMethod(Exception): + """ + Raised when trying to encrypt/decrypt with unknown method. + """ + pass + + class MacMethods(object): """ Representation of MAC methods used to authenticate document's contents. |