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