How to get the hash value of a text (for passwords stored in DB)?

Discussion in 'Programming' started by sri, Feb 8, 2007.

  1. #1
    I am trying to change the password of 'admin' user for one of my installed scripts through phpMyAdmin. It's stored in the hash format (is that what it's called?), for ex: fb01747813bd1a536cee41b390529s398

    I would like to change it to say "thisisasecret". How do I get it in the hash format?

    Edit:

    Found the answer -> http://www.adamek.biz/md5-generator.php
     
    sri, Feb 8, 2007 IP
  2. phper

    phper Active Member

    Messages:
    247
    Likes Received:
    17
    Best Answers:
    0
    Trophy Points:
    60
    #2
    FYI, you can do this easily yourself either in your script (e.g. PHP) or in your SQL statement.

    e.g. with SQL: UPDATE user SET password = MD5('thisisasecret') WHERE username = 'admin';

    e.g. with PHP: $sql = "UPDATE user SET password = '" . md5("thisisasecret") . "' WHERE username = 'admin'";
     
    phper, Feb 8, 2007 IP
  3. sri

    sri Active Member

    Messages:
    917
    Likes Received:
    55
    Best Answers:
    0
    Trophy Points:
    70
    #3
    oh ok. Thanks phper. Updated my blog and linked your post here.
     
    sri, Feb 8, 2007 IP