File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 1717
1818
1919def b64urldecode (data ):
20+ """Decodes an unpadded Base64url-encoded string."""
2021 return base64 .urlsafe_b64decode (data + "====" [:len (data ) % 4 ])
2122
2223
@@ -48,6 +49,13 @@ def __init__(self, private_key=None):
4849
4950 @classmethod
5051 def from_raw (cls , private_key ):
52+ """Initialize VAPID using a private key point in "raw" or
53+ "uncompressed" form.
54+
55+ :param private_key: A private key point in uncompressed form.
56+ :type private_key: str
57+
58+ """
5159 key = ecdsa .SigningKey .from_string (b64urldecode (private_key ),
5260 curve = cls ._curve ,
5361 hashfunc = cls ._hasher )
Original file line number Diff line number Diff line change 33
44from setuptools import setup , find_packages
55
6- __version__ = "0.8.1 "
6+ __version__ = "1.0.0 "
77
88
99def read_from (file ):
You can’t perform that action at this time.
0 commit comments