Compare commits
No commits in common. "3a20592cffca65c6ae5313edd45a0ee1f112daf8" and "4faf9a970a58487d14deae1dc101f3da30cb403f" have entirely different histories.
3a20592cff
...
4faf9a970a
@ -32,8 +32,7 @@ class NetWrapper:
|
|||||||
return encrypted_msg
|
return encrypted_msg
|
||||||
|
|
||||||
def signRSAHeader(self, type: str, extradata: dict) -> (bytes, bytes):
|
def signRSAHeader(self, type: str, extradata: dict) -> (bytes, bytes):
|
||||||
mandatory = {'type': type, 'source': self.network.own_addr}
|
header = json.dumps({'type': type, 'source': self.network.own_addr}.update(extradata)).encode('UTF-8')
|
||||||
header = json.dumps({**mandatory, **extradata}).encode('UTF-8')
|
|
||||||
h = SHA512.new(header)
|
h = SHA512.new(header)
|
||||||
headersignature = pkcs1_15.new(self.privateKey).sign(h)
|
headersignature = pkcs1_15.new(self.privateKey).sign(h)
|
||||||
return header, headersignature
|
return header, headersignature
|
||||||
|
Loading…
Reference in New Issue
Block a user