mirror of
https://github.com/markqvist/Reticulum.git
synced 2024-11-22 21:50:18 +00:00
Identity signer update
This commit is contained in:
parent
b7e69e5f91
commit
77da69c37d
@ -275,15 +275,15 @@ class Identity:
|
||||
|
||||
def sign(self, message):
|
||||
if self.prv != None:
|
||||
signer = self.prv.signer(
|
||||
signature = self.prv.sign(
|
||||
message,
|
||||
padding.PSS(
|
||||
mgf=padding.MGF1(hashes.SHA256()),
|
||||
salt_length=padding.PSS.MAX_LENGTH
|
||||
),
|
||||
hashes.SHA256()
|
||||
)
|
||||
signer.update(message)
|
||||
return signer.finalize()
|
||||
return signature
|
||||
else:
|
||||
raise KeyError("Signing failed because identity does not hold a private key")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user