encrypt/decrypt function in asp.net 2

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
You can look at the ProtectedData Class and the ProtectedMemory Class in the
System.Security.Cryptography Namespace
 
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
/// ------------------------------
 
Back
Top