We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e3c2c05 commit 9a1e4beCopy full SHA for 9a1e4be
src/hiero_sdk_python/utils/crypto_utils.py
@@ -4,6 +4,7 @@
4
5
from cryptography.hazmat.primitives.asymmetric import ec
6
from cryptography.hazmat.backends import default_backend
7
+from cryptography.hazmat.primitives import serialization
8
9
try:
10
from Crypto.Hash import keccak
@@ -60,6 +61,7 @@ def compress_with_cryptography(encoded: bytes) -> bytes:
60
61
"""
62
pub = ec.EllipticCurvePublicKey.from_encoded_point(SECP256K1_CURVE, encoded)
63
compressed = pub.public_bytes(
- ec.Encoding.X962, ec.PublicFormat.CompressedPoint
64
+ encoding=serialization.Encoding.X962,
65
+ format=serialization.PublicFormat.CompressedPoint,
66
)
67
return compressed
0 commit comments