Display the drop-down list

Test of openssl_pkey_get_public()

Example #1 : test not validated (platform dependant or random result etc.)
Example #2 : test not validated (platform dependant or random result etc.)
Example #3 : test not validated (platform dependant or random result etc.)
Example #1
$input = [
  
=> 'file:///tmp/public-key.pem',
]
test not validated (platform dependant or random result etc.)
$test_output = [
  
'result' => [
    
'resource' => 'OpenSSL key ressource',
    
'array' => [
      
'bits' => 2048,
      
'key' => '-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0llCeBjy18RylTdBih9G
MUSZIC3GzeN0vQ9W8E3nwy2jdeUnH3GBXWpMo3F43V68zM2Qz5epRNmlLSkY/PJU
fJIC8Yc1VEokT52q87hH/XJ5eS8heZnjuSlPAGi8oZ3ImVbruzV7XmlD+QsCSxJW
7tBv0dqJ71e1gAAisCXK2m7iyf/ul6rT0Zz0ptYH4IZfwc/hQ9JcMg69uM+3bb4o
BFsixMmEQwxKZsXk3YmO/YRjRbay+6+79bSV/frW+lWhknyGSIJp2CJArYcOdbK1
bXx1dRWpbNSExo7dWwuPC0Y7a5AEeoZofieQPPBhXlp1hPgLYGat71pDqBjKLvF5
GwIDAQAB
-----END PUBLIC KEY-----
'
,
      
'rsa' => [
        
'n' => 'YBxr7AF1D -tVM-u\'q]jLqx^͐ϗD٥-)T|5TJ$OGryy/!y)O' "\0" 'hșV5{^iC KVoډW' "\0" '"%nќ_C\\2Ϸm(["ɄC Jf݉cEU|Hi"@um|uulԄƎ[ F;kzh~\'<a^Zu `fZC.y',
        
'e' => '' "\0" '',
      ],
      
'type' => 0,
    ],
    
'hex' => [
      
'n' => 'd259427818f2d7c4729537418a1f46314499202dc6cde374bd0f56f04de7c32da375e5271f71815d6a4ca37178dd5ebccccd90cf97a944d9a52d2918fcf2547c9202f18735544a244f9daaf3b847fd7279792f217999e3b9294f0068bca19dc89956ebbb357b5e6943f90b024b1256eed06fd1da89ef57b5800022b025cada6ee2c9ffee97aad3d19cf4a6d607e0865fc1cfe143d25c320ebdb8cfb76dbe28045b22c4c984430c4a66c5e4dd898efd846345b6b2fbafbbf5b495fdfad6fa55a1927c86488269d82240ad870e75b2b56d7c757515a96cd484c68edd5b0b8f0b463b6b90047a86687e27903cf0615e5a7584f80b6066adef5a43a818ca2ef1791b',
      
'e' => '010001',
    ],
  ],
  
'php_version' => '7.1.30 Linux x86_64',
]
Example #2
$input = [
  
=> 'file:///tmp/public-key-with-pass.pem',
]
test not validated (platform dependant or random result etc.)
$test_output = [
  
'result' => [
    
'resource' => 'OpenSSL key ressource',
    
'array' => [
      
'bits' => 2048,
      
'key' => '-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4TIqUYxpMhciWFFSFKdF
PfpGKlyfk1Uv0RpfmTEgKbxZELV4r2tVTK6WtTVF+z+PK/w/YinncVRwN6PlC1W0
W1OkHNJ9hoEqhAgI46Ts/1OHbqQIj6KTuMvpbw8yi8Vg1MjZ4+PNawgHNoYJvip9
YM35dlb6b9bcbPXtIHv50VgIMLgIo9VtLBkHdQs9TPHkZzH+AmqZP9oe9wiMgvq3
ipGz6ErhKOBzps0p9fyCUzTDgnfn1N9qjZX/b72S5naMYMlBkCuhCNYvfdM3zkYN
Ay10YX+O3kVuzBsgNhj9rj0eiKTI4edTLaLtus20EaH71MiSz7DnKTRUJC4zARqy
TwIDAQAB
-----END PUBLIC KEY-----
'
,
      
'rsa' => [
        
'n' => '2*Qi2"XQRE=F*\\U/_1 )YxkUL5E?+?b)qTp7 U[S}*Sno2`k6    *}`vVol {X0m,u =Lg1j?J(s)S4Âwjov`A+/}7F -taEn 6=S-ʹȒϰ)4T$.3O',
        
'e' => '' "\0" '',
      ],
      
'type' => 0,
    ],
    
'hex' => [
      
'n' => 'e1322a518c6932172258515214a7453dfa462a5c9f93552fd11a5f99312029bc5910b578af6b554cae96b53545fb3f8f2bfc3f6229e771547037a3e50b55b45b53a41cd27d86812a840808e3a4ecff53876ea4088fa293b8cbe96f0f328bc560d4c8d9e3e3cd6b0807368609be2a7d60cdf97656fa6fd6dc6cf5ed207bf9d1580830b808a3d56d2c1907750b3d4cf1e46731fe026a993fda1ef7088c82fab78a91b3e84ae128e073a6cd29f5fc825334c38277e7d4df6a8d95ff6fbd92e6768c60c941902ba108d62f7dd337ce460d032d74617f8ede456ecc1b203618fdae3d1e88a4c8e1e7532da2edbacdb411a1fbd4c892cfb0e7293454242e33011ab24f',
      
'e' => '010001',
    ],
  ],
  
'php_version' => '7.1.30 Linux x86_64',
]
Example #3
$input = [
  
=> '-----BEGIN PUBLIC KEY-----
            MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0llCeBjy18RylTdBih9G
            MUSZIC3GzeN0vQ9W8E3nwy2jdeUnH3GBXWpMo3F43V68zM2Qz5epRNmlLSkY/PJU
            fJIC8Yc1VEokT52q87hH/XJ5eS8heZnjuSlPAGi8oZ3ImVbruzV7XmlD+QsCSxJW
            7tBv0dqJ71e1gAAisCXK2m7iyf/ul6rT0Zz0ptYH4IZfwc/hQ9JcMg69uM+3bb4o
            BFsixMmEQwxKZsXk3YmO/YRjRbay+6+79bSV/frW+lWhknyGSIJp2CJArYcOdbK1
            bXx1dRWpbNSExo7dWwuPC0Y7a5AEeoZofieQPPBhXlp1hPgLYGat71pDqBjKLvF5
            GwIDAQAB
            -----END PUBLIC KEY-----'
,
]
test not validated (platform dependant or random result etc.)
$test_output = [
  
'result' => [
    
'resource' => 'OpenSSL key ressource',
    
'array' => [
      
'bits' => 2048,
      
'key' => '-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0llCeBjy18RylTdBih9G
MUSZIC3GzeN0vQ9W8E3nwy2jdeUnH3GBXWpMo3F43V68zM2Qz5epRNmlLSkY/PJU
fJIC8Yc1VEokT52q87hH/XJ5eS8heZnjuSlPAGi8oZ3ImVbruzV7XmlD+QsCSxJW
7tBv0dqJ71e1gAAisCXK2m7iyf/ul6rT0Zz0ptYH4IZfwc/hQ9JcMg69uM+3bb4o
BFsixMmEQwxKZsXk3YmO/YRjRbay+6+79bSV/frW+lWhknyGSIJp2CJArYcOdbK1
bXx1dRWpbNSExo7dWwuPC0Y7a5AEeoZofieQPPBhXlp1hPgLYGat71pDqBjKLvF5
GwIDAQAB
-----END PUBLIC KEY-----
'
,
      
'rsa' => [
        
'n' => 'YBxr7AF1D -tVM-u\'q]jLqx^͐ϗD٥-)T|5TJ$OGryy/!y)O' "\0" 'hșV5{^iC KVoډW' "\0" '"%nќ_C\\2Ϸm(["ɄC Jf݉cEU|Hi"@um|uulԄƎ[ F;kzh~\'<a^Zu `fZC.y',
        
'e' => '' "\0" '',
      ],
      
'type' => 0,
    ],
    
'hex' => [
      
'n' => 'd259427818f2d7c4729537418a1f46314499202dc6cde374bd0f56f04de7c32da375e5271f71815d6a4ca37178dd5ebccccd90cf97a944d9a52d2918fcf2547c9202f18735544a244f9daaf3b847fd7279792f217999e3b9294f0068bca19dc89956ebbb357b5e6943f90b024b1256eed06fd1da89ef57b5800022b025cada6ee2c9ffee97aad3d19cf4a6d607e0865fc1cfe143d25c320ebdb8cfb76dbe28045b22c4c984430c4a66c5e4dd898efd846345b6b2fbafbbf5b495fdfad6fa55a1927c86488269d82240ad870e75b2b56d7c757515a96cd484c68edd5b0b8f0b463b6b90047a86687e27903cf0615e5a7584f80b6066adef5a43a818ca2ef1791b',
      
'e' => '010001',
    ],
  ],
  
'php_version' => '7.1.30 Linux x86_64',
]