- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
function cryptCCNumberDeCrypt( $cifer, $key )
{
return base64_decode($cifer);
/*
$res = "";
$strlen = (int)($cifer[0]);
$dWordArray = array();
for( $i=1; $i<=8; $i++ )
{
$dWordObject = DWord();
$dWordObject->SetValue(
$cifer[ ($i-1)*4 + 1 ],
$cifer[ ($i-1)*4 + 2 ],
$cifer[ ($i-1)*4 + 3 ],
$cifer[ ($i-1)*4 + 4 ] );
$dWordArray[] = $dWordObject;
}
$dWordArrayDeCifered = array();
for( $i=1; $i<=4; $i++ )
{
$deCiferedData = _gostDeCrypt( array( $dWordArray[($i-1)*2], $dWordArray[($i-1)*2 + 1]), $key );
$dWordArrayCifered[] = $deCiferedData[0];
$dWordArrayCifered[] = $deCiferedData[1];
}
foreach( $dWordArrayCifered as $dWordCifered )
{
$byte1 = 0;
$byte2 = 0;
$byte3 = 0;
$byte4 = 0;
$dWordCifered->GetValue( &$byte1, &$byte2, &$byte3, &$byte4 );
$res .= chr($byte1);
$res .= chr($byte2);
$res .= chr($byte3);
$res .= chr($byte4);
}
$temp = $res;
for( $i=1; $i<=$strlen; $i++ )
$res .= $temp[$i-1];
return $res;
*/
}
// *****************************************************************************
// Purpose encrypts cc_expires field ( see ORDERS_TABLE in database_structure.xml )
// Inputs
// Remarks
// Returns
function cryptCCHoldernameCrypt( $cc_holdername, $key )
{
return base64_encode( $cc_holdername );
}
function cryptCCHoldernameDeCrypt( $cifer, $key )
{
return base64_decode( $cifer );
}
function cryptCCExpiresCrypt( $cc_expires, $key )
{
return base64_encode( $cc_expires );
}
function cryptCCExpiresDeCrypt( $cifer, $key )
{
return base64_decode( $cifer );
}
function cryptPasswordCrypt( $password, $key )
{
return base64_encode( $password );
}
function cryptPasswordDeCrypt( $cifer, $key )
{
return base64_decode( $cifer );
}
function cryptFileParamCrypt( $getFileParam, $key )
{
return base64_encode( $getFileParam );
}
function cryptFileParamDeCrypt( $cifer, $key )
{
return base64_decode( $cifer );
}
продолжает радовать Shop-Script PREMIUM от WebAsyst LLC.
перед каждой функцией - комментарий как перед cryptCCHoldernameCrypt() (все просто не влезало)