Skip to content

AES.php encrypt / decrypt error #4803

@Credomo

Description

@Credomo

Sorry, I'm not skilled enough to correct that.

Describe
Implementation of AES encrypt / decrypt

To Reproduce
Steps to reproduce the behavior:

  1. Add some test code in main/inc/local.inc.php
include('Crypt/AES.php');
$aes = new Crypt_AES();
$aes->setKey('test_key');
$encoded = $aes->encrypt('test_message');
  1. Error in /var/log/apache2/error.log

[Tue Jul 11 14:26:58.789669 2023] [php:error] [pid 463164] [client 82.142.16.165:40551] PHP Fatal error: Uncaught Error: Undefined constant "CRYPT_AES_MODE" in /var/www/html/lms/main/inc/lib/phpseclib/Crypt/AES.php:294\nStack trace:\n#0 /var/www/html/lms/main/inc/local.inc.php(130): Crypt_AES->encrypt()\n#1 /var/www/html/lms/main/inc/global.inc.php(559): require('...')\n#2 /var/www/html/lms/index.php(15): require_once('...')\n#3 {main}\n thrown in /var/www/html/lms/main/inc/lib/phpseclib/Crypt/AES.php on line 294

Expected behavior
$encoded should be the encoded text.

Server

  • Chamilo 1.11.18
  • OS: Debian 12
  • Apache2
  • MariaDB

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions