public PreKeyRecord(uint id, ECKeyPair keyPair) { this.structure = new PreKeyRecordStructure { Id = id, PublicKey = ByteString.CopyFrom(keyPair.getPublicKey().serialize()), PrivateKey = ByteString.CopyFrom(keyPair.getPrivateKey().serialize()) }; }
public PreKeyRecord(uint id, ECKeyPair keyPair) { this.structure = PreKeyRecordStructure.CreateBuilder() .SetId(id) .SetPublicKey(ByteString.CopyFrom(keyPair.getPublicKey() .serialize())) .SetPrivateKey(ByteString.CopyFrom(keyPair.getPrivateKey() .serialize())) .Build(); }
public PreKeyRecord(byte[] serialized) { this.structure = PreKeyRecordStructure.ParseFrom(serialized); }