Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Decryption in ruby

Reply
Thread Tools

Decryption in ruby

 
 
Vetrivel Vetrivel
Guest
Posts: n/a
 
      02-09-2009
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/.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with decryption Showjumper ASP .Net 4 01-27-2006 10:40 PM
Problem with decryption Showjumper ASP .Net 2 01-23-2006 06:29 PM
NCrypto Encryption & Decryption sushant.bhatia@gmail.com ASP .Net 2 05-03-2005 01:14 AM
Forms Authentication Fails Between ASP.NET 1.0 and 1.1 Applications (Cookie Decryption Fails) John Saunders ASP .Net 1 11-18-2003 03:25 PM
database connection string encryption and decryption Srinivasa Reddy K Ganji ASP .Net 1 07-18-2003 11:30 AM



Advertisments