aboutsummaryrefslogtreecommitdiffstats
path: root/cryptography
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-02-24 20:16:10 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-02-24 20:16:10 -0600
commit5b6ce2a63a2408638bb7636639abfb1c771585d5 (patch)
tree0807fbdc572f8d031a7701121827eb77bbd88b05 /cryptography
parent81f9f5cb49435e468c08c5b553ad5667bcb77478 (diff)
downloadcryptography-5b6ce2a63a2408638bb7636639abfb1c771585d5.tar.gz
cryptography-5b6ce2a63a2408638bb7636639abfb1c771585d5.tar.bz2
cryptography-5b6ce2a63a2408638bb7636639abfb1c771585d5.zip
some style fixes suggested by pep8-naming
Diffstat (limited to 'cryptography')
-rw-r--r--cryptography/hazmat/primitives/asymmetric/rsa.py2
-rw-r--r--cryptography/hazmat/primitives/twofactor/hotp.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/cryptography/hazmat/primitives/asymmetric/rsa.py b/cryptography/hazmat/primitives/asymmetric/rsa.py
index 01218592..23572a53 100644
--- a/cryptography/hazmat/primitives/asymmetric/rsa.py
+++ b/cryptography/hazmat/primitives/asymmetric/rsa.py
@@ -132,7 +132,7 @@ class RSAPrivateKey(object):
self._modulus = modulus
@classmethod
- def generate(self, public_exponent, key_size, backend):
+ def generate(cls, public_exponent, key_size, backend):
return backend.generate_rsa_private_key(public_exponent, key_size)
@property
diff --git a/cryptography/hazmat/primitives/twofactor/hotp.py b/cryptography/hazmat/primitives/twofactor/hotp.py
index a5c88dae..80e28820 100644
--- a/cryptography/hazmat/primitives/twofactor/hotp.py
+++ b/cryptography/hazmat/primitives/twofactor/hotp.py
@@ -52,5 +52,5 @@ class HOTP(object):
offset_bits = six.indexbytes(hmac_value, 19) & 0b1111
offset = int(offset_bits)
- P = hmac_value[offset:offset + 4]
- return struct.unpack(">I", P)[0] & 0x7fffffff
+ p = hmac_value[offset:offset + 4]
+ return struct.unpack(">I", p)[0] & 0x7fffffff