Display the drop-down list

Test of openssl_encrypt()

Example #1 : test success
Example #2 : test success
Example #1
$input = [
  
=> 'This string was AES-128 / ECB encrypted.',
  
=> 'AES-128-ECB',
  
=> 'some password',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'string' => 'eXIp3BnsELdTuTvVkpoFqXuYoP6zd73ETDXiNcMhXUiuAm0ju4ufdX9Yxai4X7S3',
    
'decrypted' => 'This string was AES-128 / ECB encrypted.',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #2
$input = [
  
=> 'This string was AES-128 / CBC encrypted.',
  
=> 'AES-128-CBC',
  
=> 'some password',
  
=> 'OPENSSL_RAW_DATA',
  
=> 'some 16 byte iv.',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'string' => '>]Ilq⻕AT w]99cEX{',
    
'base64' => 'Pl3Q+QiI7LBJ4upsceK7lUFUnOjoHajQDHeMf5JdOeHzlrI5iQTtm2NFxvpYiHvU',
    
'decrypted' => 'This string was AES-128 / CBC encrypted.',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]