summaryrefslogtreecommitdiff
path: root/src/leap/common/crypto.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2013-05-29 05:00:22 +0900
committerKali Kaneko <kali@leap.se>2013-05-29 05:05:09 +0900
commit354467c605f07042568c10c3e931f7fc093c0bf4 (patch)
tree6dd8abad51635726d3a2cb09caabbe14097de07a /src/leap/common/crypto.py
parent9c12f4cce20ea1dea7e39cda583cb29ded4b4e1a (diff)
change docstring comments to use sphinx style
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 d7a8457..8a2ff20 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)