Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hello

 

I want to use Cryptography in my software , for example my application is saving passwords to database and i want to decrypt that value before saving it to database how can i acomplish this task.

The one and only

Dr. Madz

eee-m@il

  • *Experts*
Posted

The System.Security.Cryptography namespace provides classes

for encrytion and hashing. Read all about it [mshelp=ms-help://MS.VSCC/MS.MSDNVS/Cpqstart/html/cpsmpnetsamples-howtocryptography.htm]here[/mshelp].

"Being grown up isn't half as fun as growing up

These are the best days of our lives"

-The Ataris, In This Diary

Posted

Thanks, last night i was trying to encrypt one file this is the code but i was unable to decrypt it.

 

public static void Main(string[] args)
{
   string sFile = "madz.txt";

   FileStream fso = File.Create(sFile);
   RijndaelManaged rm = new RijndaelManaged();
   CryptoStream cs = new CryptoStream (
       fso, rm.CreateEncryptor(), CryptoStreamMode.Write);

   StreamWriter swo = new StreamWriter(cs);
   swo.WriteLine("I Love you my Sweet Heart !");

   swo.Close();
   cs.Close();
   fso.Close();
}

The one and only

Dr. Madz

eee-m@il

  • *Experts*
Posted
Can you show the code you used to attempt to decrypt it?

"Being grown up isn't half as fun as growing up

These are the best days of our lives"

-The Ataris, In This Diary

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...