@@ -116,7 +116,7 @@ def generate_private_key(self):
116
116
:raises NoCurveError: Curve must be set before key generation.
117
117
118
118
:return: public (verifying) key from this private key.
119
- :rtype: VerifyingKey object
119
+ :rtype: VerifyingKey
120
120
"""
121
121
if not self .curve :
122
122
raise NoCurveError ("Curve must be set prior to key generation." )
@@ -135,7 +135,7 @@ def load_private_key(self, private_key):
135
135
:raises InvalidCurveError: private_key curve not the same as self.curve
136
136
137
137
:return: public (verifying) key from this private key.
138
- :rtype: VerifyingKey object
138
+ :rtype: VerifyingKey
139
139
"""
140
140
if not self .curve :
141
141
self .curve = private_key .curve
@@ -158,7 +158,7 @@ def load_private_key_bytes(self, private_key):
158
158
:raises NoCurveError: Curve must be set before loading.
159
159
160
160
:return: public (verifying) key from this private key.
161
- :rtype: VerifyingKey object
161
+ :rtype: VerifyingKey
162
162
"""
163
163
if not self .curve :
164
164
raise NoCurveError ("Curve must be set prior to key load." )
@@ -183,7 +183,7 @@ def load_private_key_der(self, private_key_der):
183
183
:raises InvalidCurveError: private_key curve not the same as self.curve
184
184
185
185
:return: public (verifying) key from this private key.
186
- :rtype: VerifyingKey object
186
+ :rtype: VerifyingKey
187
187
"""
188
188
return self .load_private_key (SigningKey .from_der (private_key_der ))
189
189
@@ -204,7 +204,7 @@ def load_private_key_pem(self, private_key_pem):
204
204
:raises InvalidCurveError: private_key curve not the same as self.curve
205
205
206
206
:return: public (verifying) key from this private key.
207
- :rtype: VerifyingKey object
207
+ :rtype: VerifyingKey
208
208
"""
209
209
return self .load_private_key (SigningKey .from_pem (private_key_pem ))
210
210
@@ -215,7 +215,7 @@ def get_public_key(self):
215
215
Needs to be sent to the remote party.
216
216
217
217
:return: public (verifying) key from local private key.
218
- :rtype: VerifyingKey object
218
+ :rtype: VerifyingKey
219
219
"""
220
220
return self .private_key .get_verifying_key ()
221
221
@@ -310,7 +310,7 @@ def generate_sharedsecret_bytes(self):
310
310
:raises NoKeyError: public_key or private_key is not set
311
311
312
312
:return: shared secret
313
- :rtype: byte string
313
+ :rtype: bytes
314
314
"""
315
315
return number_to_string (
316
316
self .generate_sharedsecret (), self .private_key .curve .curve .p ()
@@ -323,9 +323,9 @@ def generate_sharedsecret(self):
323
323
The objects needs to have both private key and received public key
324
324
before generation is allowed.
325
325
326
- It's the same for local and remote party.
327
- shared secret(local private key, remote public key ) ==
328
- shared secret (local public key, remote private key)
326
+ It's the same for local and remote party,
327
+ shared secret(local private key, remote public key) ==
328
+ shared secret(local public key, remote private key)
329
329
330
330
:raises InvalidCurveError: public_key curve not the same as self.curve
331
331
:raises NoKeyError: public_key or private_key is not set
0 commit comments