1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Password Cryptography Format

Password Cryptography Format

6 posts, 2 answered
  1. xax_007
    xax_007 avatar
    55 posts
    Registered:
    24 Jul 2009
    11 Jan 2010
    Link to this post
    Hello Sitefinity Team,

    I would like know what is the format for save user password in sitefinity database... (md5, sha1...)

    I am do :

    FormsAuthentication.HashPasswordForStoringInConfigFile(Password.Text, System.Web.Configuration.FormsAuthPasswordFormat.SHA1.ToString());   
     

     

    or with md5, but the Hash that is generate is not igual...

    i´m doing this too:

     


    MD5CryptoServiceProvider md5Hasher = new MD5CryptoServiceProvider();   
    Byte[] b = null;   
    UTF8Encoding encoder = new UTF8Encoding();   
    b = md5Hasher.ComputeHash(encoder.GetBytes(Password.Text));  
    String RESULT = BitConverter.ToString(b).ToLower();   
     

     

    Is correctly this methods?

    For hash is only the password? (ID+Password ==> Hash ; Password ==> Hash, ...)

    Thanks,

    Salu2,
    Pablo

     

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    11 Jan 2010
    Link to this post
    Hello xax_007,

    The default TelerikMembershipProvider uses SHA1 HashAlgorithmType. There is paswordSalt that uses RNGCryptoServiceProvider Class ASP.NET class which generated the salt.

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Answered
  3. xax_007
    xax_007 avatar
    55 posts
    Registered:
    24 Jul 2009
    11 Jan 2010
    Link to this post
    Ok, but is only the password for make the codified pasword o the method use ID or name or other things?

    Thanks for reply,

    Salu2,
    Pablo
  4. xax_007
    xax_007 avatar
    55 posts
    Registered:
    24 Jul 2009
    12 Jan 2010
    Link to this post
    Hello, Ivan

    I'm trying to get the same hash for my password,
    I know mi password, I know my password hash because is in data base... but I hash my password by code and is not igual...

    I can know the algorithm to encrypt the password or is sitefinity secret?

    Thanks and best regards.
    Paul
  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    12 Jan 2010
    Link to this post
    Hi xax_007,

    The algorithm is SHA1. You can check RNGCryptoServiceProvider Class to see how you can manage the password salt.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Answered
  6. xax_007
    xax_007 avatar
    55 posts
    Registered:
    24 Jul 2009
    12 Jan 2010
    Link to this post
    Is correct, I´ve got.

    Thanks for all Ivan & Telerik Team.

    Salu2,
    Pablo
Register for webinar
6 posts, 2 answered