Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 13-06-2009
Member
 
Join Date: May 2009
Posts: 57
How to decrypt windows registry in c#

I need some help in solving the query. I had decided to use the encryption and decryption feature in my .net to secure my data. I want to add a password in the database and on the same hand retrieve it from it whenever required. What code do I required for this. What is the best practice for this issue. Kindly list the steps to perform this action. Any suggestions really appreciated.
Reply With Quote
  #2  
Old 13-06-2009
Member
 
Join Date: May 2008
Posts: 2,008
Re: How to decrypt windows registry in c#

I think that you want to first encrypt a password in your database then it will be stored on your users machine. Here there are multiple possibilities that your users can get your file make a copy of it an decrypt you password. It is actually recommended that you must move it to the user control. Other thing System.Security.Cryptography.ProtectedData is an kind of system.security assembly that uses some of the windows api's to encrypt the data with the password only which is stored in it.
Reply With Quote
  #3  
Old 13-06-2009
Member
 
Join Date: Apr 2008
Posts: 2,001
Re: How to decrypt windows registry in c#

It is a matter of concerned that in the current time it important to encrypt and decrypt the data for security purpose. I had mentioned some samples of class which will help to do the work. The list below denotes the class which will call upon a function to encrypt or decrypt data in the c# environment. The first one in the list encrypts a byte array with a key. And then an IV and returns a byte array. The second on here encrypts a string with password and so on returns a string. The third on here encrypts a byte array with a password and returns a byte array. And the last one encrypts a file with a password and writes the encrypted bytes in a different file.
  • byte[] Encrypt(byte[] clearData, byte[] Key, byte[] IV)
  • string Encrypt(string clearText, string Password)
  • byte[] Encrypt(byte[] clearData, string Password)
  • void Encrypt(string fileIn, string fileOut, string Password)
Reply With Quote
  #4  
Old 13-06-2009
Member
 
Join Date: May 2008
Posts: 2,293
Re: How to decrypt windows registry in c#

It is better to encrypt data base for security issues. There are many options like ssl, encrypt/decrypt with c#, etc. There is an utility in sql server which can make your website more secure in an easy way. The below listed are some codes which encrypt and decrypt data in sql server. The syntax are as follows :
Code:
Declare @Encrypted varbinary(max)
Declare @Decryptrd varchar(100)
Open Symmetric Key SecuredKey
DECRYPTION by Password=N'Password';
set @Encrypted= EncryptByKey (Key_GUID('SecuredKey'),'Password')
set @Decryptrd =DecryptByKey (@Encrypted)
Print @Encrypted
Print @Decryptrd
CLOSE SYMMETRIC KEY SecuredKey;
Now if you refer the above one can see the firs portion is used to create a password or encryption. Then a password is added. And then in the second position the same password is opened for decryption.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to decrypt windows registry in c#"
Thread Thread Starter Forum Replies Last Post
Windows 7: bitlocker decrypt external hard drive pUNIM Operating Systems 3 28-01-2011 06:32 PM
What is Windows registry (Registry Keys) Omar Abid Vista Help 1 24-12-2010 08:45 AM
How to decrypt a dvd Sagarsh Windows Software 2 12-06-2009 03:30 PM
Add Encrypt / Decrypt Options to Windows Vista Right-Click Menu Eldon Tips & Tweaks 0 05-11-2008 02:54 PM
"Registry editing has been disabled by your administrator" when you open the Registry Editor in Windows Vista Error Fix Mastermind Tips & Tweaks 1 19-08-2008 01:43 PM


All times are GMT +5.5. The time now is 02:04 AM.