Click here to Skip to main content
15,885,915 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
can i use md5 and SHA1 algorithm for encryption of connection strings in web.config file.if i can then please post some examples.
thanks
srivas
Posted
Comments
[no name] 10-Jul-12 11:31am    
So you have not actually tried anything? You just want someone to do your job for you?
Sergey Alexandrovich Kryukov 10-Jul-12 15:40pm    
Try what? MD5 or SHA1 are not encryption algorithm in that sense that they are irreversible. The question simply makes no sense.
--SA
[no name] 10-Jul-12 11:48am    
Ah I see, nevermind. You already have answers to this from your previous questions.
srinvas 10-Jul-12 12:12pm    
no i had tried with RSAProtectedConfigurationProvide method but i had a question whether i can use md5 and sha1 algorithm for encryption of connection string
Sergey Alexandrovich Kryukov 10-Jul-12 15:42pm    
Makes no sense. There is no way to "decrypt" the hash.
--SA

You cannot use MD5 or SHA for encrypting anything.

They are not encryption algorithms, they are hashing algorithms.

The difference is that encryption algorithms are reversible - you can restore the original input from the output with an appropriate key. Hashing algorithms are not reversible. You cannot retrieve the original input, with or without a key.

If you use MD5 or SHA to "encrypt" your connection strings, you cannot decrypt them to get the string you need back again.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 10-Jul-12 15:41pm    
My 5. But I know that you know that both algorithms are also not good as the hashing algorithms, if used for security purposes; they were found broken.
--SA
The question makes no sense; OriginalGriff explained why.

For connection string encryption, please see the following CodeProject answers:
http://www.codeproject.com/search.aspx?doctypeid=5&q=encrypt+connection+string[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900