SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    Almeaty Member
    Join Date
    Jul 2000
    Location
    Nowhere
    Posts
    278
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi: i searched the php manual but didn't find a good function for a two-way encryption. i remember to have found one in the manual but i'm not sure. however i AM sure that it's possible if i look into the password cookie of vbulletin i see my p/w is encrypted. the same string has the same encryption... maybe one of you who possesses vb can tell me how it's done there, or do you know a function?

    tia!

  2. #2
    ********* wombat firepages's Avatar
    Join Date
    Jul 2000
    Location
    Perth Australia
    Posts
    1,717
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not sure how Vb does it, but almost certainly a one way hash of your pword which is then checked against the hash of your pword in the Vb user table.

    eg)- $cookie is originally set as $cookie=MD5("your_password"); and then checked .. if(MD5($Password_from_db)==$cookie){ //cool//} etc.

  3. #3
    Almeaty Member
    Join Date
    Jul 2000
    Location
    Nowhere
    Posts
    278
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for the help. maybe you can tell me if this MD5() function takes up lots of power for the server. i suppose the site will be a huge portal and so i want to keep CPU usage low.

    thx

  4. #4
    ********* wombat firepages's Avatar
    Join Date
    Jul 2000
    Location
    Perth Australia
    Posts
    1,717
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Normally if a task or function is a resource eater the manual will mention this and suggest a better way.. this is not the case with MD5() - so I assume that it is not?

    Prety sure that this version of VBull makes use of MD5 quite a lot, perhaps someone who knows can confirm?

  5. #5
    SitePoint Enthusiast vsantola's Avatar
    Join Date
    Jan 2001
    Location
    Portugal
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi DIMA,

    MD5 is a fast message digest algorithm and will not take to much CPU usage...

    like firepages tell, you have to compare a md5 hash with a string to see if they match (md5 is a one-way hash function)...

    MD5 is used a lot, and almost everyone who what to have encrypted access in their web application will use some similar algorithm... (Vbulletin uses it, sure.. and i use it to)... other possibilities are SHA or SHA1 but this algorithm don't belongs to PHP's original function library...
    Last edited by vsantola; Feb 24, 2001 at 22:32.
    Valter Santos

    rooco is my creature (a mix of a bear with a kanguroo)... he is trained in perl, PHP and is getting a java certification right now

  6. #6
    SitePoint Evangelist mad-onion's Avatar
    Join Date
    Aug 2000
    Location
    Land of the long white cloud
    Posts
    556
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    MD5 is the algorithm used by apache's authentication schema, right?

    Just need to know that for a problem im solving right now
    SiteOptions >> Services :: Products :: Contact
    Developers of PHP, C++, Visual Basic, MySQL, and more!


Bookmarks

Posting Permissions

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