Re: using md5 but want sha-1



Hi,

first of all - SHA1 is a hashing algorithm - no encryption. Hashing is a non-reversible process, which is fine for passwords.

The corresponding class is called SHA1Managed - i would recommend moving to SHA256Managed if you can.

Both support a ComputeHash method that takes a byte[] and returns a byte[].

Especially for passwords i would recommend using PasswordDeriveBytes (1.1) or Rfc2898DeriveBytes (2.0).

have a look at them in the docs - if you have further questions - feel free to ask.

---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

Hi,
I was reading that md5 is not that secure and that sha-1 or
whilpool or
ripemd-160 were better solutions. I'm using asp.net and I want to
encrypt the
password. Where can I find a sample code for that with sha-1. I can't
seem to find one.

Thanks
Francisco


.



Relevant Pages

  • Re: using md5 but want sha-1
    ... UTF8Encoding encoder = new UTF8Encoding; ... I notice there is a SHA1CryptServiceProvider ... which is fine for passwords. ... > The corresponding class is called SHA1Managed - i would recommend moving ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • RE: SHA-1 vs. triple-DES for password encryption?
    ... when you deal with passwords. ... Cryptographers call an attack something that would work on say ... > triple-DES and SHA-1 algorithms available. ... By not using triple-DES there is no need to secure a key ...
    (SecProg)
  • RE: sha-1 cryptography
    ... MD5 and SHA-1 are not used to ensure Confidentiality, ... the confidentiality of passwords or credit card numbers or the ... Computer Emergency Response Teams, and Digital Investigations. ...
    (Security-Basics)
  • Re: SHA-1 vs. triple-DES for password encryption?
    ... > triple-DES and SHA-1 algorithms available. ... > using SHA-1 never need be retrieved, ... > of the passwords would be trivial. ... In general you should not use reversible crypto for password storage, ...
    (SecProg)
  • Re: accessing protected storage and/or crypto API
    ... I know of no VB6 sample code for this. ... I am looking for a way to store usernames and passwords for my vb6 ... From my searches in MSDN I have found the PStore COM APIs which seem to do ...
    (microsoft.public.vb.winapi)