Compare commits
2 Commits
4faf9a970a
...
3a20592cff
Author | SHA1 | Date | |
---|---|---|---|
3a20592cff | |||
01e26bf6c5 |
@ -32,7 +32,8 @@ class NetWrapper:
|
||||
return encrypted_msg
|
||||
|
||||
def signRSAHeader(self, type: str, extradata: dict) -> (bytes, bytes):
|
||||
header = json.dumps({'type': type, 'source': self.network.own_addr}.update(extradata)).encode('UTF-8')
|
||||
mandatory = {'type': type, 'source': self.network.own_addr}
|
||||
header = json.dumps({**mandatory, **extradata}).encode('UTF-8')
|
||||
h = SHA512.new(header)
|
||||
headersignature = pkcs1_15.new(self.privateKey).sign(h)
|
||||
return header, headersignature
|
||||
|
Loading…
Reference in New Issue
Block a user