Encryption.

0 Ruz ChuH · March 14, 2015
Hello, 
 
I have a small c# program where I need to hash my password and use the hashed password as a key to encrypt data.
 
How do I make the hashed password as a key and then encrypt data? 
 
Thanks.

Post a Reply

Replies

Oldest  Newest  Rating
0 Ruz ChuH · March 14, 2015
I did the hashing part already. I need help in using the hashed password as a key. 
0 Branislav Lazic · March 14, 2015
Why are you reinventing a wheal? Basically, you are trying to use that hashed password as a "salt" for further encryption. You already have hashing algorithms that do that. Or you could even use hashing algorithms that feature auto generated salt such as BCrypt. On the pilejunk of my GitHub profile, you have this small program that uses few hashing algorithms for password encryption:

https://github.com/BranislavLazic/EasyPasswordEncoder
0 Eugene Botma · March 15, 2015
@Branislav Lazic hashing and encryption is not the same thing. Ruz wants to encrypt data with a password, not just store a password in a safe way.

@Ruz ChuH Take a look at the MSDN page for encrypting data. They have examples on how to generate keys and encrypt and decrypt the data as well.

https://msdn.microsoft.com/en-us/library/as0w18af(v=vs.110).aspx
  • 1

C#

107,276 followers
About

C# is an object-oriented language designed for improving the development of web applications.

Links
Moderators