encrypt/decrypt function in asp.net 2

G

Guest

i am looking for code sampe in aso.net 2 for encrypt/decrypt
of paswr d withought using any external DLL (judt to use existing net2 tools)

thnaks i nadvance
peleg
 
S

Sheng Jiang[MVP]

You can look at the ProtectedData Class and the ProtectedMemory Class in the
System.Security.Cryptography Namespace
 
G

Guest

Mmm...

If the aim of this is to store encrypted a password in your database, the
best way of doing this is just storing a hash of the password, then when the
user enters the password you pass the hash and you compare the hashed filed
in the database.

By using this approach nobody will be able to steal you the passwords by
accessing your database.

More info about encrypting / hash / security:

http://msdn.microsoft.com/msdnmag/issues/06/00/SecurityBriefs/Default.aspx

HTH
Braulio

/// ------------------------------
/// Braulio Diez
///
/// http://www.tipsdotnet.com
/// ------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top