mirror of
https://github.com/markqvist/Reticulum.git
synced 2024-12-24 15:09:37 -05: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