me$ cd ~/Desktop
me$ php -f php7-decrypt-from-encryptor-AES256.php 

------------------------------------------------------
TROI test of Troi Encryptor Plug-in 6.0 generated data 
------------------------------------------------------
Using as input a text file, which must be encrypted with the Encr_EncryptAES function of Troi Encryptor 6.

Found the extra info file.
NOTE This also contains the password, for testing only: NEVER ADD THIS IN REAL IMPLEMENTATIONS!

Imported: iv (Base64) = 'HO3yxh4XjvGXyIniyCs/Sw=='
Imported: password = 'testpassword'
Imported: salt (hex) = 'F1862291284EFFF9'

Found the data file. 
File path = /Users/tro/Desktop/For_OpenSSL_Encrypted_data.txt
File len = 130
File data (Base64) = 
U2FsdGVkX1/xhiKRKE7/+Thkmi8fTHts6GGeHD8y5TVgvIG3B1zkbH5s+Fhsa7PwNLfd+XR9
k1kWortPrn/10EWskZTJ2O61HZANNIL7Ew9nmWy+j8vzIeH/8JkZt4PY

Determine the key to use.
We use the supplied password and the salt to generate the key.
Generating the key with pbkdf2 and iterations = 10000
   Using Key (Base64) = Vx80e4kJz0ftzzDzYwJHQdwCsGq+dXKZ8WS7b1fyne8=
   Using IV (Base64) = HO3yxh4XjvGXyIniyCs/Sw==
   Block size = 16
   IV size = 16
   Key size = 32

Handling salt.
   Salt in ciphertext (hex) = f1862291284efff9

Decrypting the data now.
The decrypted data (clean): 
------------------------------------------------------
Hello there. This is a simple test text.
Last line of this text.
------------------------------------------------------
End of script

me$ 
