setPendingKeyExchange method

void setPendingKeyExchange(
  1. int sequence,
  2. ECKeyPair ourBaseKey,
  3. ECKeyPair ourRatchetKey,
  4. IdentityKeyPair ourIdentityKey,
)

Implementation

void setPendingKeyExchange(int sequence, ECKeyPair ourBaseKey,
    ECKeyPair ourRatchetKey, IdentityKeyPair ourIdentityKey) {
  final structure = SessionStructurePendingKeyExchange.create()
    ..sequence = sequence
    ..localBaseKey = ourBaseKey.publicKey.serialize()
    ..localBaseKeyPrivate = ourBaseKey.privateKey.serialize()
    ..localRatchetKey = ourRatchetKey.publicKey.serialize()
    ..localRatchetKeyPrivate = ourRatchetKey.privateKey.serialize()
    ..localIdentityKey = ourIdentityKey.getPublicKey().serialize()
    ..localIdentityKeyPrivate = ourIdentityKey.getPrivateKey().serialize();

  _sessionStructure.pendingKeyExchange = structure;
}