1.2.1630. ext/xxtea

Extension xxtea : XXTEA encryption algorithm extension for PHP.

XXTEA is a fast and secure encryption algorithm. This is a XXTEA extension for PHP. It is different from the original XXTEA encryption algorithm. It encrypts and decrypts string instead of uint32 array, and the key is also string.

<?php
// Example is extracted from the xxtea repository on github : tests/xxtea.phpt

$str = 'Hello World! 你好,中国🇨🇳!';
$key = '1234567890';
$base64 = 'D4t0rVXUDl3bnWdERhqJmFIanfn/6zAxAY9jD6n9MSMQNoD8TOS4rHHcGuE=';
$encrypt_data = xxtea_encrypt($str, $key);
$decrypt_data = xxtea_decrypt($encrypt_data, $key);
if ($str == $decrypt_data && base64_encode($encrypt_data) == $base64) {
    echo 'success!';
} else {
    echo base64_encode($encrypt_data);
    echo 'fail!';
}
?>

See also PECL ext/xxtea and ext/xxtea on Github.

1.2.1630.1. Connex PHP features

1.2.1630.1.1. Specs

Short name

Extensions/Extxxtea

Rulesets

All, Appinfo, CE, Changed Behavior

Exakat since

1.1.7

PHP Version

With PHP 8.0 and older

Severity

Time To Fix

Precision

Very high

Available in

Entreprise Edition, Community Edition, Exakat Cloud