mirror of
https://github.com/markqvist/Reticulum.git
synced 2025-12-15 08:29:24 -05:00
Standardised ratchet id getter
This commit is contained in:
parent
b506ca94d0
commit
c119ef4273
2 changed files with 9 additions and 4 deletions
|
|
@ -269,6 +269,7 @@ class Destination:
|
|||
if self.ratchets != None:
|
||||
self.rotate_ratchets()
|
||||
ratchet = RNS.Identity._ratchet_public_bytes(self.ratchets[0])
|
||||
RNS.Identity._remember_ratchet(self.hash, ratchet)
|
||||
|
||||
if app_data == None and self.default_app_data != None:
|
||||
if isinstance(self.default_app_data, bytes):
|
||||
|
|
@ -573,7 +574,7 @@ class Destination:
|
|||
if self.type == Destination.SINGLE and self.identity != None:
|
||||
selected_ratchet = RNS.Identity.get_ratchet(self.hash)
|
||||
if selected_ratchet:
|
||||
self.latest_ratchet_id = RNS.Identity.truncated_hash(selected_ratchet)
|
||||
self.latest_ratchet_id = RNS.Identity._get_ratchet_id(selected_ratchet)
|
||||
return self.identity.encrypt(plaintext, ratchet=selected_ratchet)
|
||||
|
||||
if self.type == Destination.GROUP:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue