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