1

for encryption data i wants to use in Drupal9 the PHP-encryption library width "REAL AES" Module. But Drupal can not find the PHP-encryption library while enaple the "REAL AES" module.

It is very new to use PHP-encryption in Drupal9, so i think there can be a bug in code or in readme.txt of Installationprozess.

So my main question is: In Which folder do i have to install PHP-encryption-Code? I installed by the hint of REAME.txt "composer require defuse/php-encryption". But it was unclear in which folder:

  1. In Root of Server? or

  2. In Drupal-Folder sites/all/libraries/php-encryption or

  3. In Drupal-Folder of REal AES Module: modules/real_aes/defuse/

  4. Question: Drupal9 works with composer. Do I have to activate the PHP-encryption library especially? for ex. in main composer.json ?

Thank you for your help, because I m new in Drupal9.

After activating the REAl AEs Module in Drupal9, the module wants to use the library. That does not work, so it shows the errormessage

Please install the Defuse PHP-encryption library via Composer. See README.txt

I use this Drupalmodule: https://www.drupal.org/project/real_aes

PHP-encryption library: https://github.com/defuse/php-encryption


So now im looking in the code of php-encryption library und found the Problem in checking the existens of a Class which causes the problem.

so this becomes false instead of true:

if (class_exists('\Defuse\Crypto\Crypto'))

in https://www.drupal.org/files/issues/2613682-3.patch So the result is the text above "Please install the Defuse PHP-encryption library via Composer"...

but the class Crypto is in folder /defuse/src/Crypto.php

<?php

namespace Defuse\Crypto;

use Defuse\Crypto\Exception as Ex;

class Crypto
{
Philippj
  • 17
  • 3

1 Answers1

0

Now it works:

I had to install php-encryption-library with composer in folder of the module!

Philippj
  • 17
  • 3