Decryption in ruby

I have a decryption doutes in ruby.

A person encrypts the data in c# language using
RSACryptoServiceProvider class.
Example RSA decryption in c# Language

Deryption Algorithm in C#

public static string DecryptData(string data2Decrypt)
{
  AssignParameter();
  byte[] getpassword = Convert.FromBase64String(data2Decrypt);
  StreamReader reader = new StreamReader(@"C:\Keys\privatekey.xml");
  string publicPrivateKeyXML = reader.ReadToEnd();
  rsa.FromXmlString(publicPrivateKeyXML);
  reader.Close();
  //read ciphertext, decrypt it to plaintext
  byte[] plain = rsa.Decrypt(getpassword, false);
  return System.Text.Encoding.UTF8.GetString(plain);
}

How to do c# Decryption in ruby.

···

--
Posted via http://www.ruby-forum.com/.