diff options
author | Simo Sorce <simo@redhat.com> | 2015-03-24 09:49:40 -0400 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2015-03-24 09:49:40 -0400 |
commit | 4b458940168a8e16ff8c3c3aa099dee117c12de1 (patch) | |
tree | 1bc88c86ba784e7453df1d1b0ab329c9d0ec396c | |
parent | 6352cc9d24b3ab714e210abeeb8b1d6c1b86cdad (diff) | |
download | jwcrypto-4b458940168a8e16ff8c3c3aa099dee117c12de1.tar.gz jwcrypto-4b458940168a8e16ff8c3c3aa099dee117c12de1.tar.xz jwcrypto-4b458940168a8e16ff8c3c3aa099dee117c12de1.zip |
Rename JWE.decrypt() to JWE._decrypt()
Make the function private as it is not supposed to be used directly,
rather deserialize() should be used.
-rw-r--r-- | jwcrypto/jwe.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/jwcrypto/jwe.py b/jwcrypto/jwe.py index c69d5a8..eb48d94 100644 --- a/jwcrypto/jwe.py +++ b/jwcrypto/jwe.py @@ -556,7 +556,7 @@ class JWE(object): '"%s"' % k) # FIXME: allow to specify which algorithms to accept as valid - def decrypt(self, key, ppe): + def _decrypt(self, key, ppe): jh = self.get_jose_header(ppe.get('header', None)) @@ -649,12 +649,12 @@ class JWE(object): if 'recipients' in self.objects: for rec in self.objects['recipients']: try: - self.decrypt(key, rec) + self._decrypt(key, rec) except Exception, e: # pylint: disable=broad-except self.decryptlog.append('Failed: [%s]' % str(e)) else: try: - self.decrypt(key, self.objects) + self._decrypt(key, self.objects) except Exception, e: # pylint: disable=broad-except self.decryptlog.append('Failed: [%s]' % str(e)) |