Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def sec(self):
"""Sec representation of the key"""
flag = secp256k1.EC_COMPRESSED if self.compressed else secp256k1.EC_UNCOMPRESSED
return secp256k1.ec_pubkey_serialize(self._point, flag)
def public_key(self):
raw = secp256k1.ec_pubkey_create(self.secret)
sec = secp256k1.ec_pubkey_serialize(raw, secp256k1.EC_COMPRESSED)
return PublicKey(sec)