(privkey)
| 18 | return pyelliptic.ECC(curve='secp256k1',pubkey=pubkey_bin) |
| 19 | # Converts hex private key into hex public key |
| 20 | def privToPub(privkey): |
| 21 | private_key = a.changebase(privkey, 16, 256, minlen=32) |
| 22 | public_key = pointMult(private_key) |
| 23 | return hexlify(public_key) |
| 24 | # Encrypts message with hex public key |
| 25 | def encrypt(msg,hexPubkey): |
| 26 | return pyelliptic.ECC(curve='secp256k1').encrypt(msg,hexToPubkey(hexPubkey)) |
nothing calls this directly
no test coverage detected