diff options
author | drebs <drebs@leap.se> | 2013-04-30 17:41:31 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2013-04-30 17:41:31 -0300 |
commit | 516a5adb4f8328bd94446f4ea7ad0bc9298d7bfb (patch) | |
tree | 7ce57bc0a824a31e519ee18cebe11e3e1918ef97 /src/leap/soledad/crypto.py | |
parent | 1e9b0e85a5de03f399c0cf52f46458dc6e77e103 (diff) |
Use uuid instead of address.
Diffstat (limited to 'src/leap/soledad/crypto.py')
-rw-r--r-- | src/leap/soledad/crypto.py | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/leap/soledad/crypto.py b/src/leap/soledad/crypto.py index c956f602..9d2227bd 100644 --- a/src/leap/soledad/crypto.py +++ b/src/leap/soledad/crypto.py @@ -49,20 +49,6 @@ class SoledadCrypto(object): self._pgp = openpgp.OpenPGPScheme(self._soledad) self._symkey = None - def encrypt_asym(self, data, key): - """ - Encrypt data. - - @param data: the data to be encrypted - @type data: str - @param key: the key to be used for encryption - @type key: str - - @return: the encrypted data - @rtype: str - """ - return openpgp.encrypt_asym(data, key) - def encrypt_sym(self, data, passphrase): """ Encrypt C{data} using a {password}. @@ -77,21 +63,6 @@ class SoledadCrypto(object): """ return openpgp.encrypt_sym(data, passphrase) - def decrypt_asym(self, data): - """ - Decrypt data. - - @param data: the data to be decrypted - @type data: str - @param passphrase: the passphrase to be used for decryption - @type passphrase: str - - @return: the decrypted data - @rtype: str - """ - key = self._pgp.get_key(self._soledad.address, private=True) - return openpgp.decrypt_asym(data, key) - def decrypt_sym(self, data, passphrase): """ Decrypt data using symmetric secret. @@ -127,16 +98,6 @@ class SoledadCrypto(object): """ return openpgp.is_encrypted_sym(data) - def is_encrypted_asym(self, data): - """ - Test whether some chunk of data was encrypted to an OpenPGP private - key. - - @return: whether data is encrypted to an OpenPGP private key - @rtype: bool - """ - return openpgp.is_encrypted_asym(data) - def passphrase_hash(self, suffix): """ Generate a passphrase for symmetric encryption. |