#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    2
    Rep Power
    0
    I have been failing miserably at making a good pattern match of an MD5....

    Any help for a burnt out programmer?
  2. #2
  3. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Location
    Sydney, Australia
    Posts
    5
    Rep Power
    0
    What exactly is it you are trying to do? What are you trying to achieve?
    An example would help.

    Graham
  4. #3
  5. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    6
    Rep Power
    0
    Why use a pattern match in an MD5 hash string?..

    doens't the hash supposed to be completely
    the same?..

    ------------------
    Greetings lewi
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    2
    Rep Power
    0
    OKay, I guess I did not explain myself....


    I need to have a HTTP-GET request pass an md5 in to a file. I need to make sure that it is an actuall md5... I don't care if it is fake, but it needs to be an md5.

    The reason is this, a directory is going to be made for the user based on this string. So they can upload files... I don't want them to be able to use for example "../../../../usr/local/" in this string.

    Thanks
  8. #5
  9. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    6
    Rep Power
    0
    MD5 is for password use, aint it ?..
    maybe i'm mistaking..

    on way encryption of a password or such
    like the PASSWORD function in mysql

    ------------------
    Greetings lewi
  10. #6
  11. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    2
    Rep Power
    0
    md5 sums are generic. People use them for all sorts of things... I md5 my sessions, so that they are all in the same format.

    Other people will get the md5 of a binary file for security reasons... if the file is changed, then there is a problem.

    It is just a mathematical sum. Not encryption by any excepted means, because you can't decrypt it at all...

    The reason I want an md5, is that it is sufficient for my clients needs.

    So does anyone know how to pattern match one in PHP? or is this going to be a pure discussion?

    Sorry to sound bitter, but I do need to get this site up.

  12. #7
  13. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    2
    Rep Power
    0
    ereg("([a-f0-9]){32}", $ID)


    That was what I needed... I just have a hard time figuring these stupid thigns out.

    All it does is make sure that $ID is 32 chars of any of these "0123456789abcedf"
  14. #8
  15. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    6
    Rep Power
    0
    aah, why didn't u say so
    that would be much easier,

    u got me thinking al wrong

    well, glad u solved it... still don't
    really get it why u use md5, but that
    doesn't matter

    ------------------
    Greetings lewi

Similar Threads

  1. Help with pattern matching in drop down menu
    By pic in forum PHP Development
    Replies: 3
    Last Post: August 24th, 2003, 04:57 PM
  2. Replies: 2
    Last Post: August 10th, 2003, 04:42 PM
  3. Pattern Matching
    By Chip in forum MySQL Help
    Replies: 3
    Last Post: May 3rd, 2002, 10:37 AM
  4. pattern matching in js
    By adunkey in forum HTML Programming
    Replies: 4
    Last Post: January 22nd, 2002, 08:38 AM
  5. Pattern matching - correct pattern for this string?!?
    By Pha2er in forum PHP Development
    Replies: 0
    Last Post: November 1st, 2001, 03:37 AM

IMN logo majestic logo threadwatch logo seochat tools logo