using md5 but want sha-1

Discussion in 'ASP .Net Security' started by Frank, Jan 31, 2006.

  1. Frank

    Frank Guest

    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
     
    Frank, Jan 31, 2006
    #1
    1. Advertisements

  2. 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
    > Francisc
     
    Dominick Baier [DevelopMentor], Jan 31, 2006
    #2
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Augusto Rocha

    How do I decrypt a SHA stored password?

    Augusto Rocha, Feb 19, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    15,825
    Karl Jensen
    Feb 19, 2004
  2. =?Utf-8?B?SlQ=?=
    Replies:
    0
    Views:
    2,279
    =?Utf-8?B?SlQ=?=
    Mar 21, 2006
  3. Marco Herrn

    crypt, md5, sha modules

    Marco Herrn, Jan 24, 2004, in forum: Python
    Replies:
    1
    Views:
    494
    Paul Rubin
    Jan 24, 2004
  4. Almad

    sha-2 and sha-512 bindings

    Almad, May 4, 2005, in forum: Python
    Replies:
    1
    Views:
    815
  5. Replies:
    9
    Views:
    17,676
    John Salerno
    May 8, 2006
  6. sha, PyCrypto, SHA-256

    , Dec 16, 2006, in forum: Python
    Replies:
    3
    Views:
    2,762
    Tim Henderson
    Dec 19, 2006
  7. Peter Woodsky

    create a md5 / md5 passwd with a salt

    Peter Woodsky, Nov 20, 2008, in forum: Ruby
    Replies:
    6
    Views:
    478
    Brian Candler
    Nov 21, 2008
  8. myalo
    Replies:
    4
    Views:
    2,035
    A. Sinan Unur
    Nov 28, 2007
Loading...