コード例 #1
0
ファイル: PreKeyRecord.cs プロジェクト: Muraad/libaxolotl-net
 public PreKeyRecord(byte[] serialized)
 {
     // TODO: Check if right
     using (var stream = new MemoryStream(serialized)) {
         structure = Serializer.Deserialize<PreKeyRecordStructure> (stream);
     }
 }
コード例 #2
0
ファイル: PreKeyRecord.cs プロジェクト: Muraad/libaxolotl-net
 public PreKeyRecord(UInt32 id, ECKeyPair keyPair)
 {
     structure = new PreKeyRecordStructure {
         Id = (UInt32)id,
         PublicKey = keyPair.PublicKey.Serialize(),
         PrivateKey = keyPair.PrivateKey.Serialize()
     };
 }