1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

$5 for the one who gets this right...

Discussion in 'BlackHat Lounge' started by wkrappen91, Apr 3, 2011.

  1. wkrappen91

    wkrappen91 Power Member

    Joined:
    Sep 9, 2010
    Messages:
    588
    Likes Received:
    720
    Location:
    127.0.0.1
    I just cant make sense of this...

    if the number
    8322
    results in
    83221287325510

    and the number

    4235
    results in
    42351267614618

    as used in this function:

    Code:
    function encrypt($string){
      $result = ''; $key = '[COLOR="Red"]83221287325510'[/COLOR];
      for($i=0; $i<strlen($string); $i++) {
        $char = substr($string, $i, 1);
        $keychar = substr($key, ($i % strlen($key))-1, 1);
        $char = chr(ord($char)+ord($keychar));
        $result.=$char;
      }
      return base64_encode($result);
    }
    I need it so i can generate the 14 digit number by knowing the first 4 digits...

    How are the numbers generated (the $key thing...)

    $5 for whoever gets this right.

    Thanks in advance
     
  2. latalata

    latalata Registered Member

    Joined:
    Jan 4, 2009
    Messages:
    64
    Likes Received:
    16
    Location:
    EST
    im first, use php function substr()
     
  3. wkrappen91

    wkrappen91 Power Member

    Joined:
    Sep 9, 2010
    Messages:
    588
    Likes Received:
    720
    Location:
    127.0.0.1
    yea... thanks...
    not helping...
    i need to generate the 14 digit number by just knowing the first 4 ( i know its possible, but i dont know their algo...)
    Read the post again...