日期:2014-05-02 浏览次数:20481 次
基于进制转换的
<?
//made by huyang @2005-01-20||11-04-06
##用n进位制到m进位制
##0~9A-Z,最多可理解为36进制范围
print'<title>加密解密法</title>';
class carry
{
function carry($n,$m)
{
$this->n=$n;
$this->m=$m;
$this->chn['0']=0;
$this->chn['1']=1;
$this->chn['2']=2;
$this->chn['3']=3;
$this->chn['4']=4;
$this->chn['5']=5;
$this->chn['6']=6;
$this->chn['7']=7;
$this->chn['8']=8;
$this->chn['9']=9;
$this->chn['A']=10;
$this->chn['B']=11;
$this->chn['C']=12;
$this->chn['D']=13;
$this->chn['E']=14;
$this->chn['F']=15;
$this->chn['G']=16;
$this->chn['H']=17;
$this->chn['I']=18;
$this->chn['J']=19;
$this->chn['K']=20;
$this->chn['L']=21;
$this->chn['M']=22;
$this->chn['N']=23;
$this->chn['O']=24;
$this->chn['P']=25;
$this->chn['Q']=26;
$this->chn['R']=27;
$this->chn['S']=28;
$this->chn['T']=29;
$this->chn['U']=30;
$this->chn['V']=31;
$this->chn['W']=32;
$this->chn['X']=33;
$this->chn['Y']=34;
$this->chn['Z']=35;
$this->cn[0]='0';
$this->cn[1]='1';
$this->cn[2]='2';
$this->cn[3]='3';
$this->cn[4]='4';
$this->cn[5]='5';
$this->cn[6]='6';
$this->cn[7]='7';
$this->cn[8]='8';
$this->cn[9]='9';
$this->cn[10]='A';
$this->cn[11]='B';
$this->cn[12]='C';
$this->cn[13]='D';
$this->cn[14]='E';
$this->cn[15]='F';
$this->cn[16]='G';
$this->cn[17]='H';
$this->cn[18]='I';
&