Permalink
Browse files

Deduplicate logic of int2bytes function.

  • Loading branch information...
1 parent 88cf9dd commit 9db2d36c041830c46eab4efc2b71be5919f0480d @rfk rfk committed Oct 18, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 browserid/crypto/fallback.py
@@ -89,7 +89,7 @@ def sign(self, data):
raise ValueError("private key not present")
c = int(self._get_digest(data), 16)
m = pow(c, d, n)
- return unhexlify(hex(m)[2:].rstrip("L").encode("ascii"))
+ return int2bytes(m)
def _get_digest(self, data):
digest = self.HASHMOD(data).hexdigest().encode("ascii")

0 comments on commit 9db2d36

Please sign in to comment.