How to use the fastecdsa.encoding.sec1.SEC1Encoder function in fastecdsa

To help you get started, we’ve selected a few fastecdsa examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github libp2p / py-libp2p / libp2p / crypto / ecc.py View on Github external
def from_bytes(cls, data: bytes, curve: str) -> "ECCPublicKey":
        curve_type = infer_local_type(curve)
        public_key_impl = SEC1Encoder.decode_public_key(data, curve_type)
        return cls(public_key_impl, curve_type)
github libp2p / py-libp2p / libp2p / crypto / ecc.py View on Github external
def to_bytes(self) -> bytes:
        return SEC1Encoder.encode_public_key(self.impl, compressed=False)