Display the drop-down list

Test of openssl_public_decrypt()

Example #1 : test success
Example #2 : test success
Example #3 : test success
Example #4 : test success
Example #1
$input = [
  
=> '_DOUBLE_QUOTES_\\x35\\x96\\xfd\\x91\\x7c\\x03\\xca\\xe3\\x2f\\x0b\\xe5\\x3f\\xd2\\xc7\\x4f\\x1d\\xbc\\xd1\\x4a\\xb3\\x03\\x99\\x85\\x21\\xfb\\x6a\\x10\\xa0\\xcf\\x62\\x88\\xa2\\x3e\\x4b\\x71\\x40\\x6e\\xa4\\xb4\\x9e\\x68\\xc6\\x5b\\x33\\xbd\\xec\\x4d\\xb9\\xfb\\x20\\x83\\x79\\xfe\\x54\\x68\\x35\\x3e\\x20\\xfe\\x8a\\x94\\x7f\\xca\\xc5\\xd2\\xb1\\xb2\\xea\\xd4\\xe6\\xc5\\x88\\x27\\x2b\\x92\\x56\\x57\\x1a\\x81\\x58\\x9a\\xd2\\x8b\\xe3\\xce\\xbc\\x4c\\x01\\x15\\xe6\\x40\\xae\\x64\\x35\\xcd\\xef\\x03\\xa4\\x6c\\xa0\\xc5\\xf3\\x6b\\xd8\\xf6\\x49\\x6c\\x61\\xa0\\xfc\\x6a\\x7a\\xcc\\x36\\x17\\xae\\x3c\\x7d\\x5e\\xd7\\x00\\xb5\\xad\\x3f\\xe9\\x5e\\x31\\xd1\\xca\\x8b\\x9c\\xde\\xb5\\xc5\\x1a\\xf0\\xe4\\xe9\\x10\\xcf\\x5a\\x30\\x7c\\x70\\x8d\\x3d\\xaf\\x85\\xa4\\x65\\xd2\\x68\\x3a\\xbd\\x98\\x57\\x9f\\xa6\\xf2\\x73\\x9c\\x12\\x73\\x9f\\xb5\\x28\\xab\\xa4\\x70\\x85\\xcc\\x24\\xc4\\xbc\\x81\\x70\\xbc\\x2d\\x5f\\xff\\x80\\x70\\x97\\x54\\x92\\xb1\\xcc\\x43\\x59\\xf1\\xff\\x4d\\xc7\\x9b\\x37\\x76\\x03\\xa5\\xb4\\x81\\x3b\\x9c\\xa6\\xd6\\xd8\\xdf\\x4b\\x4a\\x97\\x75\\xb6\\x35\\x27\\xc0\\xbb\\x65\\xdf\\xe0\\x0a\\xc1\\x21\\x2f\\xe7\\xab\\x41\\xf4\\x3e\\x1b\\xf9\\x46\\x67\\xec\\xe3\\x84\\x97\\x6b\\x73\\x05\\x6b\\x16\\x18\\xcc\\xae\\x65\\x0f\\x6d\\x3c\\x4c\\xf0\\xda\\x1b\\x07\\x41\\x06\\x9a\\x06_DOUBLE_QUOTES_',
  
=> '$decrypted',
  
=> 'file:///tmp/public-key.pem',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'decrypted' => 'this is some data',
    
'bool' => true,
  ],
  
'php_version' => '7.1.30 Linux x86_64',
]
Example #2
$input = [
  
'base64' => 'NZb9kXwDyuMvC+U/0sdPHbzRSrMDmYUh+2oQoM9iiKI+S3FAbqS0nmjGWzO97E25+yCDef5UaDU+IP6KlH/KxdKxsurU5sWIJyuSVlcagVia0ovjzrxMARXmQK5kNc3vA6RsoMXza9j2SWxhoPxqesw2F648fV7XALWtP+leMdHKi5zetcUa8OTpEM9aMHxwjT2vhaRl0mg6vZhXn6byc5wSc5+1KKukcIXMJMS8gXC8LV//gHCXVJKxzENZ8f9Nx5s3dgOltIE7nKbW2N9LSpd1tjUnwLtl3+AKwSEv56tB9D4b+UZn7OOEl2tzBWsWGMyuZQ9tPEzw2hsHQQaaBg==',
  
=> '$data',
  
=> '$decrypted',
  
=> 'file:///tmp/public-key.pem',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'data' => '5|/ ?OJ!jb>Kq@nh[3M yTh5> ұň\'+VWXҋμL@d5lkIlajz6<}^' "\0" '?^1ʋ޵Z0|p=eh:Wss(p$ļp-_pTCYMǛ7v;KJu5\'e
!/A>Fgㄗksk̮em<LA'
,
    
'decrypted' => 'this is some data',
    
'bool' => true,
  ],
  
'php_version' => '7.1.30 Linux x86_64',
]
Example #3
$input = [
  
'e_data' => 'this is some data',
  
'e_key' => 'file:///tmp/private-key.pem',
  
'base64' => '$base64',
  
=> '$data',
  
=> '$decrypted',
  
=> 'file:///tmp/public-key.pem',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'e_bool' => true,
    
'data' => '5|/ ?OJ!jb>Kq@nh[3M yTh5> ұň\'+VWXҋμL@d5lkIlajz6<}^' "\0" '?^1ʋ޵Z0|p=eh:Wss(p$ļp-_pTCYMǛ7v;KJu5\'e
!/A>Fgㄗksk̮em<LA'
,
    
'base64' => 'NZb9kXwDyuMvC+U/0sdPHbzRSrMDmYUh+2oQoM9iiKI+S3FAbqS0nmjGWzO97E25+yCDef5UaDU+IP6KlH/KxdKxsurU5sWIJyuSVlcagVia0ovjzrxMARXmQK5kNc3vA6RsoMXza9j2SWxhoPxqesw2F648fV7XALWtP+leMdHKi5zetcUa8OTpEM9aMHxwjT2vhaRl0mg6vZhXn6byc5wSc5+1KKukcIXMJMS8gXC8LV//gHCXVJKxzENZ8f9Nx5s3dgOltIE7nKbW2N9LSpd1tjUnwLtl3+AKwSEv56tB9D4b+UZn7OOEl2tzBWsWGMyuZQ9tPEzw2hsHQQaaBg==',
    
'decrypted' => 'this is some data',
    
'bool' => true,
  ],
  
'php_version' => '7.1.30 Linux x86_64',
]
Example #4
$input = [
  
'e_data' => 'this is some data',
  
'e_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-----'
,
  
=> '$data',
  
=> '$decrypted',
  
=> '-----BEGIN PUBLIC KEY-----
            MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0llCeBjy18RylTdBih9G
            MUSZIC3GzeN0vQ9W8E3nwy2jdeUnH3GBXWpMo3F43V68zM2Qz5epRNmlLSkY/PJU
            fJIC8Yc1VEokT52q87hH/XJ5eS8heZnjuSlPAGi8oZ3ImVbruzV7XmlD+QsCSxJW
            7tBv0dqJ71e1gAAisCXK2m7iyf/ul6rT0Zz0ptYH4IZfwc/hQ9JcMg69uM+3bb4o
            BFsixMmEQwxKZsXk3YmO/YRjRbay+6+79bSV/frW+lWhknyGSIJp2CJArYcOdbK1
            bXx1dRWpbNSExo7dWwuPC0Y7a5AEeoZofieQPPBhXlp1hPgLYGat71pDqBjKLvF5
            GwIDAQAB
            -----END PUBLIC KEY-----'
,
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'e_bool' => true,
    
'data' => '5|/ ?OJ!jb>Kq@nh[3M yTh5> ұň\'+VWXҋμL@d5lkIlajz6<}^' "\0" '?^1ʋ޵Z0|p=eh:Wss(p$ļp-_pTCYMǛ7v;KJu5\'e
!/A>Fgㄗksk̮em<LA'
,
    
'base64' => 'NZb9kXwDyuMvC+U/0sdPHbzRSrMDmYUh+2oQoM9iiKI+S3FAbqS0nmjGWzO97E25+yCDef5UaDU+IP6KlH/KxdKxsurU5sWIJyuSVlcagVia0ovjzrxMARXmQK5kNc3vA6RsoMXza9j2SWxhoPxqesw2F648fV7XALWtP+leMdHKi5zetcUa8OTpEM9aMHxwjT2vhaRl0mg6vZhXn6byc5wSc5+1KKukcIXMJMS8gXC8LV//gHCXVJKxzENZ8f9Nx5s3dgOltIE7nKbW2N9LSpd1tjUnwLtl3+AKwSEv56tB9D4b+UZn7OOEl2tzBWsWGMyuZQ9tPEzw2hsHQQaaBg==',
    
'decrypted' => 'this is some data',
    
'bool' => true,
  ],
  
'php_version' => '7.1.30 Linux x86_64',
]