Forum: Ruby Decryption in ruby

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Vetrivel V. (Guest)
on 2009-02-09 07:18
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)
  byte[] getpassword = Convert.FromBase64String(data2Decrypt);
  StreamReader reader = new StreamReader(@"C:\Keys\privatekey.xml");
  string publicPrivateKeyXML = reader.ReadToEnd();
  //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.
This topic is locked and can not be replied to.