-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: s_hashim
Message 4 in Discussion



U can also use this 
encryption to store encrypted password in DB
 
when the user logs in 

just pass that password 
and encrypt that and compare with DB pass word no need to again decrypt the DB 
value
 
 
IMPORTS 
System.Security.Cryptography
Public 
Function GetEncryptedData(ByVal Data As String) As 
String
        Dim shaM As New 
SHA1Managed()
        Dim Enc_Password As 
String = 
Convert.ToBase64String(shaM.ComputeHash(Encoding.ASCII.GetBytes((Data))))
        
GetEncryptedData = Enc_Password
     END 
FUNCTION
 

*********** 
Keep Smiling, 
Regards. 


Sayad Hashim Ali 
Kazi
Microsoft India Community Star. 


SQL Star International Ltd.
SQL 
House, #13,Infocity,Madhapur,
Hyderabad 500 081.
Tel: +91-40-2310 
1625(Off),+91-40-5536 5573(Res)
www.mugh.net 
-----Original Message-----
From: shashijeevan 
[mailto:[EMAIL PROTECTED]
Sent: Monday, February 16, 2004 5:26 
PM
To: BDOTNET
Subject: Re: Password 
Encryption



  
  
    
    New Message on BDOTNET
  
    

Password 
  Encryption


  
    
    
      Reply

      
        
          
          
             
            Reply to Sender   Recommend 
            Message 3 in Discussion 
            
    
      
        
          
          
            From: shashijeevan 
          
            

              Hi Balaji,
               
              You can hash your password and store in the database. When 
              the user logs-in hash the supplied password and compare it 
              with the stored hash value.
               
              This can be implemented using the 
              System.Web.Security.FormsAuthentication 
              class.
               
              The following method returns the hashed value of the 
              password
               
              FormsAuthentication.HashPasswordForStoringInConfigFile(pass, 
              "SHA1");
               
              First parameter is the clear text value of the 
password,
              Second parameter is the Hashing algorithm to be used.
              Return value is the hased value of the 'pass' variable.
               
              HTH
               
              regards,
              shashi
               
               
View other groups in this 
  category. 



-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to