summaryrefslogtreecommitdiff
path: root/src/leap/common/crypto.py
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-05-28 17:38:30 -0300
committerTomás Touceda <chiiph@leap.se>2013-05-28 17:38:30 -0300
commit205fcd6c6bb8712a115f3dfe738c490f5427e09b (patch)
tree0d824ab1fc1de09fe2136f1419a0a2966225fac4 /src/leap/common/crypto.py
parentb7dc270bce885ce5079d86d8e52fd96b8390fc9d (diff)
parent354467c605f07042568c10c3e931f7fc093c0bf4 (diff)
Merge remote-tracking branch 'kali/bug/allow-absolute-paths2' into develop
Diffstat (limited to 'src/leap/common/crypto.py')
-rw-r--r--src/leap/common/crypto.py40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/leap/common/crypto.py b/src/leap/common/crypto.py
index 3d6030b..7f80a8a 100644
--- a/src/leap/common/crypto.py
+++ b/src/leap/common/crypto.py
@@ -53,15 +53,15 @@ def encrypt_sym(data, key, method=EncryptionMethods.AES_256_CTR):
"""
Encrypt C{data} with C{key}, using C{method} encryption method.
- @param data: The data to be encrypted.
- @type data: str
- @param key: The key used to encrypt C{data} (must be 256 bits long).
- @type key: str
- @param method: The encryption method to use.
- @type method: str
-
- @return: A tuple with the initial value and the encrypted data.
- @rtype: (long, str)
+ :param data: The data to be encrypted.
+ :type data: str
+ :param key: The key used to encrypt C{data} (must be 256 bits long).
+ :type key: str
+ :param method: The encryption method to use.
+ :type method: str
+
+ :return: A tuple with the initial value and the encrypted data.
+ :rtype: (long, str)
"""
leap_assert_type(key, str)
@@ -83,17 +83,17 @@ def decrypt_sym(data, key, method=EncryptionMethods.AES_256_CTR, **kwargs):
"""
Decrypt C{data} with C{key} using C{method} encryption method.
- @param data: The data to be decrypted.
- @type data: str
- @param key: The key used to decrypt C{data} (must be 256 bits long).
- @type key: str
- @param method: The encryption method to use.
- @type method: str
- @param kwargs: Other parameters specific to each encryption method.
- @type kwargs: dict
-
- @return: The decrypted data.
- @rtype: str
+ :param data: The data to be decrypted.
+ :type data: str
+ :param key: The key used to decrypt C{data} (must be 256 bits long).
+ :type key: str
+ :param method: The encryption method to use.
+ :type method: str
+ :param kwargs: Other parameters specific to each encryption method.
+ :type kwargs: dict
+
+ :return: The decrypted data.
+ :rtype: str
"""
leap_assert_type(key, str)