Skip to content

Commit

Permalink
fix shamir in python3
Browse files Browse the repository at this point in the history
  • Loading branch information
prusnak committed Jun 9, 2016
1 parent 7712c8b commit f9f7720
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion mnemonic/shamir.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,8 @@ def combine(self, shares):
points = [(int(x[1], 16), int(x[2:], 16)) for x in shares]
prime = self.primes[datalen]
r = points_to_secret_int(points, prime)
r = hex(r)[2:-1].zfill(datalen * 2)
r = hex(r)[2:]
if r.endswith('L'):
r = r[:-1]
r = r.zfill(datalen * 2)
return binascii.unhexlify(r)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

setup(
name='mnemonic',
version='0.14',
version='0.15',
author='Bitcoin TREZOR',
author_email='info@bitcointrezor.com',
description='Implementation of Bitcoin BIP-0039',
Expand Down

0 comments on commit f9f7720

Please sign in to comment.