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 17
17
18
18
19
19
def b64urldecode (data ):
20
+ """Decodes an unpadded Base64url-encoded string."""
20
21
return base64 .urlsafe_b64decode (data + "====" [:len (data ) % 4 ])
21
22
22
23
@@ -48,6 +49,13 @@ def __init__(self, private_key=None):
48
49
49
50
@classmethod
50
51
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
+ """
51
59
key = ecdsa .SigningKey .from_string (b64urldecode (private_key ),
52
60
curve = cls ._curve ,
53
61
hashfunc = cls ._hasher )
Original file line number Diff line number Diff line change 3
3
4
4
from setuptools import setup , find_packages
5
5
6
- __version__ = "0.8.1 "
6
+ __version__ = "1.0.0 "
7
7
8
8
9
9
def read_from (file ):
You can’t perform that action at this time.
0 commit comments