Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2010
    Posts
    7

    Unanswered: crypt(), md5, bf, and others algorithmic

    Hello, I have a logical problema with MD5/bf,ecc.. algorithmic.
    I need to store a password into bf or md5 algorhitmic.

    Code:
    UPDATE table SET field = crypt('value', gen_salt('md5'));
    It's ok.
    Than I need to extract a Username AND Password.

    Code:
    SELECT COUNT(accounts.account_id) AS account_count
    					FROM accounts
    					WHERE accounts.account_username = 'username'
    					AND accounts.account_password = crypt('value', gen_salt('md5'))
    				LIMIT 1
    But the count returns 0.
    Now... where is the problem?
    Last edited by vhost87; 03-05-10 at 16:31.

  2. #2
    Join Date
    Aug 2009
    Location
    Olympia, WA
    Posts
    337
    Did you read the manual? You can't keep sending in different values as salt and hope to get the same answer.

  3. #3
    Join Date
    Mar 2010
    Posts
    7
    Quote Originally Posted by artacus72 View Post
    Did you read the manual? You can't keep sending in different values as salt and hope to get the same answer.
    Yes, but the example into manual si very limited

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •