Click here to Skip to main content
15,909,373 members
Home / Discussions / C#
   

C#

 
AnswerRe: Generation of Report in .NET from whatever comments in Solution file. Pin
bruze28-Sep-08 23:39
bruze28-Sep-08 23:39 
GeneralRe: Generation of Report in .NET from whatever comments in Solution file. Pin
Piyush Vaishnav29-Sep-08 0:00
Piyush Vaishnav29-Sep-08 0:00 
GeneralRe: Generation of Report in .NET from whatever comments in Solution file. Pin
bruze29-Sep-08 0:20
bruze29-Sep-08 0:20 
GeneralRe: Generation of Report in .NET from whatever comments in Solution file. Pin
Piyush Vaishnav29-Sep-08 0:23
Piyush Vaishnav29-Sep-08 0:23 
QuestionChange BOOT SCREEN of Windows XP Pin
Sifar - 028-Sep-08 22:57
Sifar - 028-Sep-08 22:57 
AnswerRe: Change BOOT SCREEN of Windows XP Pin
Thomas Stockwell29-Sep-08 2:00
professionalThomas Stockwell29-Sep-08 2:00 
GeneralRe: Change BOOT SCREEN of Windows XP Pin
Sifar - 029-Sep-08 20:34
Sifar - 029-Sep-08 20:34 
QuestionEncryption and Decryption Pin
srinivaskonijeti28-Sep-08 22:28
srinivaskonijeti28-Sep-08 22:28 
HI ALL,
I am using the following code for Decrtption

public static string Decrypt(string xxxxx)
{

RijndaelManaged RijndaelCipher = new RijndaelManaged();
string Password = "srinu";
byte[] EncryptedData = Convert.FromBase64String(xxxxx);
byte[] Salt = Encoding.ASCII.GetBytes(Password.Length.ToString());
//Making of the key for decryption
PasswordDeriveBytes SecretKey = new PasswordDeriveBytes(Password, Salt);
//Creates a symmetric Rijndael decryptor object.
ICryptoTransform Decryptor = RijndaelCipher.CreateDecryptor(SecretKey.GetBytes(32), SecretKey.GetBytes(16));
MemoryStream memoryStream = new MemoryStream(EncryptedData);
//Defines the cryptographics stream for decryption.THe stream contains decrpted data
CryptoStream cryptoStream = new CryptoStream(memoryStream, Decryptor, CryptoStreamMode.Read);
byte[] PlainText = new byte[EncryptedData.Length];
int DecryptedCount = cryptoStream.Read(PlainText, 0, PlainText.Length);
memoryStream.Close();
cryptoStream.Close();
//Converting to string
string DecryptedData = Encoding.Unicode.GetString(PlainText, 0, DecryptedCount);
return DecryptedData;
}

It is showing me an error

"An exception of type 'System.FormatException' occurred in .DLL but was not handled in user code

Additional information: Invalid length for a Base-64 char array."

in the Line "byte[] EncryptedData = Convert.FromBase64String(xxxxx);"

Plz help me solve this ASAP.
AnswerRe: Encryption and Decryption Pin
leppie28-Sep-08 23:18
leppie28-Sep-08 23:18 
Questionweb service Pin
arkiboys28-Sep-08 22:10
arkiboys28-Sep-08 22:10 
AnswerRe: web service Pin
Guffa28-Sep-08 22:18
Guffa28-Sep-08 22:18 
GeneralRe: web service Pin
arkiboys28-Sep-08 22:25
arkiboys28-Sep-08 22:25 
GeneralRe: web service Pin
Guffa29-Sep-08 2:02
Guffa29-Sep-08 2:02 
GeneralRe: web service Pin
arkiboys29-Sep-08 2:35
arkiboys29-Sep-08 2:35 
AnswerRe: web service Pin
N a v a n e e t h29-Sep-08 0:11
N a v a n e e t h29-Sep-08 0:11 
GeneralRe: web service Pin
arkiboys29-Sep-08 0:38
arkiboys29-Sep-08 0:38 
QuestionChange Size of control on Form Maximize event Pin
hitesh sojitra28-Sep-08 21:27
hitesh sojitra28-Sep-08 21:27 
AnswerRe: Change Size of control on Form Maximize event Pin
Giorgi Dalakishvili28-Sep-08 21:52
mentorGiorgi Dalakishvili28-Sep-08 21:52 
Questioni have a problem in Croping an image? Pin
maifs28-Sep-08 21:12
maifs28-Sep-08 21:12 
AnswerRe: i have a problem in Croping an image? Pin
Giorgi Dalakishvili28-Sep-08 21:55
mentorGiorgi Dalakishvili28-Sep-08 21:55 
AnswerRe: i have a problem in Croping an image? Pin
Mark Salsbery29-Sep-08 7:37
Mark Salsbery29-Sep-08 7:37 
QuestionHow to discard Dialog "Page x of document" shown after printing each page of a multi page document? Pin
karimy.reza28-Sep-08 20:56
karimy.reza28-Sep-08 20:56 
QuestionRememberMe option to remember only username using asp:login? Pin
.NetRams28-Sep-08 20:26
.NetRams28-Sep-08 20:26 
AnswerRe: RememberMe option to remember only username using asp:login? Pin
John Ad28-Sep-08 20:40
John Ad28-Sep-08 20:40 
GeneralRe: RememberMe option to remember only username using asp:login? Pin
.NetRams28-Sep-08 22:42
.NetRams28-Sep-08 22:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.