Beispiel #1
0
 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();
 }
Beispiel #3
0
 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);
 }
Beispiel #5
0
 public PreKeyRecord(byte[] serialized)
 {
     this.structure = PreKeyRecordStructure.ParseFrom(serialized);
 }