Generating a 20 character code from a string

Discussion in 'PHP' started by projectWORD, Jul 30, 2008.

  1. #1
    Hey,
    I need to create a simple encyption. When given a string, my program will need to return a 20 digit long alphanumeric string. These strings may be over 20 characters in the first place. Each string has to encrypt to the same result everytime, therefore each string should also give a different result from one another.

    E.g.

    String1 = "Thisisthefirststring"
    String2 = "Thisisthesecondstring"

    $result1 = "slkjdisuej23ndj90k3n"
    $result2 = "dhsj4keod901kdjdnsm"

    If the program was the run again the same results would be given.

    $result1 = "slkjdisuej23ndj90k3n"
    $result2 = "dhsj4keod901kdjdnsm"

    What is the best way for me to do this?>
     
    projectWORD, Jul 30, 2008 IP
  2. jayshah

    jayshah Peon

    Messages:
    1,126
    Likes Received:
    68
    Best Answers:
    1
    Trophy Points:
    0
    #2
    jayshah, Jul 30, 2008 IP
  3. projectWORD

    projectWORD Active Member

    Messages:
    287
    Likes Received:
    2
    Best Answers:
    1
    Trophy Points:
    63
    #3
    Thanks thats great
     
    projectWORD, Jul 30, 2008 IP