public void setPendingKeyExchange(uint sequence, ECKeyPair ourBaseKey, ECKeyPair ourRatchetKey, IdentityKeyPair ourIdentityKey) { PendingKeyExchange structure = new PendingKeyExchange { LocalBaseKey = ByteString.CopyFrom(ourBaseKey.getPublicKey().serialize()), LocalBaseKeyPrivate = ByteString.CopyFrom(ourBaseKey.getPrivateKey().serialize()), LocalRatchetKey = ByteString.CopyFrom(ourRatchetKey.getPublicKey().serialize()), LocalRatchetKeyPrivate = ByteString.CopyFrom(ourRatchetKey.getPrivateKey().serialize()), LocalIdentityKey = ByteString.CopyFrom(ourIdentityKey.getPublicKey().serialize()), LocalIdentityKeyPrivate = ByteString.CopyFrom(ourIdentityKey.getPrivateKey().serialize()) }; this.sessionStructure.PendingKeyExchange = structure; }
public void setPendingKeyExchange(uint sequence, ECKeyPair ourBaseKey, ECKeyPair ourRatchetKey, IdentityKeyPair ourIdentityKey) { PendingKeyExchange structure = PendingKeyExchange.CreateBuilder() .SetSequence(sequence) .SetLocalBaseKey(ByteString.CopyFrom(ourBaseKey.getPublicKey().serialize())) .SetLocalBaseKeyPrivate(ByteString.CopyFrom(ourBaseKey.getPrivateKey().serialize())) .SetLocalRatchetKey(ByteString.CopyFrom(ourRatchetKey.getPublicKey().serialize())) .SetLocalRatchetKeyPrivate(ByteString.CopyFrom(ourRatchetKey.getPrivateKey().serialize())) .SetLocalIdentityKey(ByteString.CopyFrom(ourIdentityKey.getPublicKey().serialize())) .SetLocalIdentityKeyPrivate(ByteString.CopyFrom(ourIdentityKey.getPrivateKey().serialize())) .Build(); this.sessionStructure = this.sessionStructure.ToBuilder() .SetPendingKeyExchange(structure) .Build(); }