示例#1
0
 public byte[] serialize()
 {
     return(IdentityKeyPairStructure.CreateBuilder()
            .SetPublicKey(ByteString.CopyFrom(publicKey.serialize()))
            .SetPrivateKey(ByteString.CopyFrom(privateKey.serialize()))
            .Build().ToByteArray());
 }
示例#2
0
 public byte[] serialize()
 {
     return(new IdentityKeyPairStructure
     {
         PublicKey = ByteString.CopyFrom(publicKey.serialize()),
         PrivateKey = ByteString.CopyFrom(privateKey.serialize())
     }.ToByteArray());
 }