Fix name error

This commit is contained in:
bmng-dev 2014-06-08 14:07:28 +00:00
parent 1f9991bcd0
commit be5ab22d16

View File

@ -4,7 +4,7 @@ def makeCryptor(privkey):
private_key = a.changebase(privkey, 16, 256, minlen=32) private_key = a.changebase(privkey, 16, 256, minlen=32)
public_key = pointMult(private_key) public_key = pointMult(private_key)
privkey_bin = '\x02\xca\x00\x20' + private_key privkey_bin = '\x02\xca\x00\x20' + private_key
pubkey_bin = '\x02\xca\x00\x20' + public_key[1:-32] + '\x00\x20' + pubkey[-32:] pubkey_bin = '\x02\xca\x00\x20' + public_key[1:-32] + '\x00\x20' + public_key[-32:]
cryptor = pyelliptic.ECC(curve='secp256k1',privkey=privkey_bin,pubkey=pubkey_bin) cryptor = pyelliptic.ECC(curve='secp256k1',privkey=privkey_bin,pubkey=pubkey_bin)
return cryptor return cryptor
def hexToPubkey(pubkey): def hexToPubkey(pubkey):