def handleSenderKeyDistributionMessage(self, senderKeyDistributionMessage, axolotlAddress): groupId = senderKeyDistributionMessage.groupId axolotlSenderKeyDistributionMessage = SenderKeyDistributionMessage( serialized=senderKeyDistributionMessage. axolotl_sender_key_distribution_message) groupSessionBuilder = GroupSessionBuilder(self.store) senderKeyName = SenderKeyName(groupId, axolotlAddress) groupSessionBuilder.process(senderKeyName, axolotlSenderKeyDistributionMessage)
def __init__(self, store, username): """ :param store: :type store: AxolotlStore :param username: :type username: str """ self._username = username # type: str self._store = store # type: LiteAxolotlStore self._identity = self._store.getIdentityKeyPair() # type: IdentityKeyPair self._registration_id = self._store.getLocalRegistrationId() # type: int | None assert self._registration_id is not None assert self._identity is not None self._group_session_builder = GroupSessionBuilder(self._store) # type: GroupSessionBuilder self._session_ciphers = {} # type: dict[str, SessionCipher] self._group_ciphers = {} # type: dict[str, GroupCipher] logger.debug("Initialized AxolotlManager [username=%s, db=%s]" % (self._username, store))
def onNewStoreSet(self, store): if store is not None: self.groupSessionBuilder = GroupSessionBuilder(store)