Display the drop-down list

Test of openssl_public_encrypt()

Example #1 : test not validated (platform dependant or random result etc.)
Example #2 : test not validated (platform dependant or random result etc.)
Example #1
$input = [
  
=> 'this is some data',
  
=> '$crypted',
  
=> 'file:///tmp/public-key.pem',
  
'd_key' => 'file:///tmp/private-key.pem',
]
test not validated (platform dependant or random result etc.)
$test_output = [
  
'result' => [
    
'crypted' => 'j5)-;ԽN' "\0" 'af]GwD] `h=P@;(f*?dHPC!H3_Ax<H2,(y\'7o;' "\0" 'Eg3n\'ZgԆ!\\lr$G{%)f' "\0" 'd{J|jؗgXݎl$]l*-ha42tEǨuRpf7/ B55fpXY
h+h/IŰ$&u'
,
    
'bool' => true,
    
'base64' => 'aoMOGDUp/8b8LYe+nDvUvU7+AGFmXUd3tkRdwwtgaD1Qg9BAsDsouJpmySo/ZMZIE1DuQxIhSDNfQXg8ArZIxzIsKHknmRCizMca7jf2bzuoALRFZzNuJ53hFVqv4WfUhiGDslz5bKJyq6okR4d7JSnpuxKVZv3oAANk8rrWFfoWHYx7GMUZSvOhfKYIl/Vq2JdnWBuUyQPdjs4RvANs+LoE9P6XJF3TbB0qLdhoYTQDMnRFv9bt6drHqHVSwPm4oXB/xWarN6DQ6C8VDUIdzDWOkRCc3eakFDVmtnAa+qdY1MJZCsLGGpZozcwraJQvgugI/Z5JxbChliSx+gQmdQ==',
    
'd_bool' => true,
    
'decrypted' => 'this is some data',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #2
$input = [
  
=> 'this is some data',
  
=> '$crypted',
  
=> '-----BEGIN PUBLIC KEY-----
            MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0llCeBjy18RylTdBih9G
            MUSZIC3GzeN0vQ9W8E3nwy2jdeUnH3GBXWpMo3F43V68zM2Qz5epRNmlLSkY/PJU
            fJIC8Yc1VEokT52q87hH/XJ5eS8heZnjuSlPAGi8oZ3ImVbruzV7XmlD+QsCSxJW
            7tBv0dqJ71e1gAAisCXK2m7iyf/ul6rT0Zz0ptYH4IZfwc/hQ9JcMg69uM+3bb4o
            BFsixMmEQwxKZsXk3YmO/YRjRbay+6+79bSV/frW+lWhknyGSIJp2CJArYcOdbK1
            bXx1dRWpbNSExo7dWwuPC0Y7a5AEeoZofieQPPBhXlp1hPgLYGat71pDqBjKLvF5
            GwIDAQAB
            -----END PUBLIC KEY-----'
,
  
'd_key' => '-----BEGIN RSA PRIVATE KEY-----
                MIIEogIBAAKCAQEA0llCeBjy18RylTdBih9GMUSZIC3GzeN0vQ9W8E3nwy2jdeUn
                H3GBXWpMo3F43V68zM2Qz5epRNmlLSkY/PJUfJIC8Yc1VEokT52q87hH/XJ5eS8h
                eZnjuSlPAGi8oZ3ImVbruzV7XmlD+QsCSxJW7tBv0dqJ71e1gAAisCXK2m7iyf/u
                l6rT0Zz0ptYH4IZfwc/hQ9JcMg69uM+3bb4oBFsixMmEQwxKZsXk3YmO/YRjRbay
                +6+79bSV/frW+lWhknyGSIJp2CJArYcOdbK1bXx1dRWpbNSExo7dWwuPC0Y7a5AE
                eoZofieQPPBhXlp1hPgLYGat71pDqBjKLvF5GwIDAQABAoIBACPItYsSy3UzYT7L
                OKYTrfBBuD8GKpTqBfkHvAWDa1MD15P92Mr7l0NaCxGfAy29qSa6LdFy/oPM9tGY
                9TxKyV6rxD5sfwEI3+Z/bw6pIe4W5F1eTDaQnHHqehsatkRUQET9yXp+na8w/zRF
                0C0PQKS95tfvcpm59RGCdGQ8+aZw+cIy/xez75W8IS/hagMxe7xYPjpkOkSCCEJU
                zmbVq6AyWodASV0p4H9p8I+c0vO2hJ/ELJ167w6T+2/GlZg979rlyHoTW8jK2BbG
                IRGaPo+c2GANXa686tdpbkPd6oJliXwBSNolxmXShvlveBbPFAJJACzCmbXNj9kH
                6/K+SWkCgYEA7FNudcTkRPV8TzKhJ1AzDjw3VcnraYhY8IlNxbk7RVHLdkoUtwk/
                mImeBlEfCoz9V+S/gRgeQ+1Vb/BCbS24+bN/+IGoNRFMRcOieFt6lQUpj7a9NeSo
                IEclGgUiU7QR3xH73SB4GC3rgSPeHJhJZC5EJq5TzYjXTPGPpBD3zicCgYEA49wz
                zfMDYIH8h4L65r/eJYIbLwpvgktgaYvhijO3qfZSWW+Y19jCBn55f65YOhPGQBHA
                my0f+tVxFNZ/OupbrAIIzogxlCIYHNBawDhoHN/sB3/lSBAjifySNLyRlA62oA0w
                wXvXVLVWMa3aXim3c9AlnLF1fHwcvwpOKSfdye0CgYBb1mBKq+T5V1yjek1d9bCh
                i40FbZ5qOG43q2Ppvn3mBk9G/KroJlPsdy5NziB9/SRGj8JL7I92Xjihc4Cc5PPJ
                NZQ5gklXtg0p30i39PTCDGuGScFlvCIJyRwF7JDWblezlE2INSH2Y4HtgX7DJfr/
                T2t0jLJMYS0p3YWwgFeMaQKBgHUIe/8y6zAdc5QynSX5tGL1gXrW1FFK39k2RICU
                cag1YTSYkhuDNJzbRxJifORPlcsAkzngooVWLb+zMCQVjUI6xUU3RKe+Hz5lccc6
                8ZarGHL9qMkrqOVNudamZ+tw5zIrtDgcoIvcm8nmbrtgl94/MaJar2ph4O3qoByZ
                Ylw9AoGAIdS79s0VKkj4VVXqK47ZcI7jGL4V4C8ujU8YcMNV88xwCoDg9ZIFprWA
                P5p/cnvj6aHnqL58XiH0+bE0Lt3J+U6N6JelQQevgBHooMFh4FpDXcVda7xB3rK3
                woqbi8fNhr827H2maxIZPtVG95/mvR4k5z1Jrdnr34ZUmtC6U5Q=
                -----END RSA PRIVATE KEY-----'
,
]
test not validated (platform dependant or random result etc.)
$test_output = [
  
'result' => [
    
'crypted' => ';' "\0" '<>l[(@2,2-3O/St_?THX_{76a2PX.h٪&sxER[VC\\*biƤheNĠ
ZFwW?a/}1_.RqѾ>,QB9Xj:Y#){Y$? sIuﻙOqt' 
"\0" 'FR9{ tY;1tIY5',
    
'bool' => true,
    
'base64' => 'O4IPoAA88T6FlhzjbFso/kDt7DIsMrctxzNP8qwP3C+qUx90o8EYwP/4hqemXz9UFUjPWF/3yMzOexS/GKY3NmEygVAegspYLmjE2aomc3iARVKdghTiW7WCqKFW7ENcp/Ts4SqywWJpxqSwo8walBZoZU72xKAKspigWkYQm4l3vFcX/z+iCN5hFuovlrh95MC4qTEeCN1fLlJxr4PRvj4sjfaXUcxCyzmMB5FYaoA6olmf2sMZI9sSqCn1DnukvYmgWcQkwT8evpkM9XP8lp6kSaV1nJbvu5lP8JxxH6l0/qMAvZBGn+RSOep7wgyFohF0WTudDzHmdElZpDXe1A==',
    
'd_bool' => true,
    
'decrypted' => 'this is some data',
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]