Closed TvoroG closed 3 years ago
I think i just need convert cryptography.hazmat.backends.openssl.ec._EllipticCurvePrivateKey
to bytes and then base64 encode it.
Found how to get public key in string format from py_vapid/main.py
:
raw_pub = vapid.public_key.public_bytes(
serialization.Encoding.X962,
serialization.PublicFormat.UncompressedPoint
)
b64urlencode(raw_pub)
Can you help me? I don't know how to do it :) You have
from_string
method to convert to vapid key, but I need opposite of that.