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. Advertising

  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. Advertising

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. Marco Herrn

    crypt, md5, sha modules

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

    sha-2 and sha-512 bindings

    Almad, May 4, 2005, in forum: Python
    Replies:
    1
    Views:
    668
  3. Replies:
    9
    Views:
    17,087
    John Salerno
    May 8, 2006
  4. sha, PyCrypto, SHA-256

    , Dec 16, 2006, in forum: Python
    Replies:
    3
    Views:
    2,260
    Tim Henderson
    Dec 19, 2006
  5. myalo
    Replies:
    4
    Views:
    1,284
    A. Sinan Unur
    Nov 28, 2007
Loading...

Share This Page