From b761bfc3f95bc87461c8cc8ec8462b1a995ebddb Mon Sep 17 00:00:00 2001 From: drebs Date: Fri, 28 Nov 2014 11:41:25 -0200 Subject: Refactor client crypto for better code readability. --- common/src/leap/soledad/common/crypto.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'common') 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. -- cgit v1.2.3