public byte[] Serialize() { return(new IdentityKeyPairStructure { PublicKey = ByteString.CopyFrom(_publicKey.Serialize()), PrivateKey = ByteString.CopyFrom(_privateKey.Serialize()) }.ToByteArray()); }
public byte[] Serialize() { return(StorageProtos .IdentityKeyPairStructure .CreateBuilder() .SetPublicKey(ByteString.CopyFrom(_publicKey.Serialize())) .SetPrivateKey(ByteString.CopyFrom(_privateKey.Serialize())) .Build() .ToByteArray()); }