Re: Trying to create an encryption method

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Modified the script, and that's what I needed, thanks.
Jochem Maas wrote:
> $secret  = "HalloWorld";
> $encoded = "";
>
> $a = $b = range("a","z");
> shuffle($b);
> $c = array_combine($a, $b);
>
> foreach (str_split(strtolower($secret)) as $v)
> 	$encoded .= isset($c[ $v ]) ? $c[ $v ] : $v;
>
> var_dump($c, $secret, $encoded);
>   

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux