Hier nochmal der PHP-Code zum testen:
// User entschlüsseln
$u1 = base64_encode(encrypt('abc', $global_crypt));
echo 'u1: '.$u1."\n";
$p1 = base64_encode(encrypt('xyz', $u1));
echo 'p1: '.$p1."\n";
$p1 = base64_encode(base64_encode(encrypt($p1, $global_crypt)));
echo 'p1: '.$p1."\n\n";
// Passwort entschlüsseln
echo 'p2: '.$p1."\n";
$p2 = decrypt(base64_decode(base64_decode($p1)), $global_crypt);
echo 'p2: '.$p2."\n";
$p2 = decrypt(base64_decode($p2), $u1);
echo 'p2: '.$p2."\n";
$u2 = decrypt(base64_decode($u1), $global_crypt);
echo 'u2: '.$u2."\n\n";
So, und hier teste ich mit der Übergabe von Delphi (
DEC):
$user = '6l7GU7LYt04pVHc/00d7JjB/1bjCRn5n18SPwc/AK77qEUtTAEU=';
$c_user = decrypt(base64_decode($user), $global_crypt);
echo 'u1: '.$c_user."\n\n";