public PreKeyRecord(byte[] serialized) { // TODO: Check if right using (var stream = new MemoryStream(serialized)) { structure = Serializer.Deserialize<PreKeyRecordStructure> (stream); } }
public PreKeyRecord(UInt32 id, ECKeyPair keyPair) { structure = new PreKeyRecordStructure { Id = (UInt32)id, PublicKey = keyPair.PublicKey.Serialize(), PrivateKey = keyPair.PrivateKey.Serialize() }; }