public void Serialize(IValueWriter writer, RSACrypto crypto)
{
if (!writer.WriteBool (this.publicKey != null))
return;
writer.WriteBytes (crypto.Encrypt (this.Exponent));
int first = this.Modulus.Length / 2;
writer.WriteBytes (crypto.Encrypt (this.Modulus.Copy (0, first)));
writer.WriteBytes (crypto.Encrypt (this.Modulus.Copy (first, this.Modulus.Length - first)));
}