RSA Encryption
From: Nivek Eroom (kenmoore21_at_hotmail.com)
Date: 01/26/04
- Next message: Hernan de Lahitte: "Authorization and Profile Application Block"
- Previous message: Hernan de Lahitte: "Re: .NET HttpModule & NTLM Integrated Authentication"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 26 Jan 2004 15:28:05 -0500
Hi,
I'm a little new with the System.Security.Cryptography in the .Net
framework...
string value = "Potatoe";
byte[] test =
RSAEncrypt(ByteConverter.GetBytes(value),RSA.ExportParameters(false),
false);
string l = Convert.ToBase64String(test);
// That doesnt work
SaveToXml()
GetFromXml()
// End
//If i ommit the line above...the code is working..any idea why
//I want to save that string to an xml file but when i save it and
// i get it back...decryptedData doesn't return me the
//same result as the encrypted data....
dataToEncrypt = Convert.FromBase64String(l);
decryptedData = RSADecrypt(dataToEncrypt,RSA.ExportParameters(true), false);
if(decryptedData!=null)
{
string ret = ByteConverter.GetString(decryptedData)==value;
// ret is not equal to "Potatoe"
}
else
{
ret = false;
}
thanks...
-- Nivek Eroom Post message to group, everyones got benefits
- Next message: Hernan de Lahitte: "Authorization and Profile Application Block"
- Previous message: Hernan de Lahitte: "Re: .NET HttpModule & NTLM Integrated Authentication"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|