显示下拉菜单

Test of openssl_pkey_export() 本页面仅提供英文版本。

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 = [
  
=> '$key',
  
=> '$out',
  
=> 'this is a passphrase',
]
test not validated (platform dependant or random result etc.)
$test_output = [
  
'result' => [
    
'out' => '-----BEGIN ENCRYPTED PRIVATE KEY-----
MIIFDjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQI+HqyvVsNWWwCAggA
MBQGCCqGSIb3DQMHBAjHIP42wJKFDASCBMitXPiO+YX9UNjI2MQJzgAGqH2QZFzv
yQBSAWP50LKKQsolJDp+sf48bnZeYdKGBuZgyIJduYZb9Ww1P4VGE+7UZWmQOsx7
zyZwzUOK5xKE8YC12HQWc8H0aqa3z/GVt3MXqWpp4w9VMtJ34A9wnOesMhyaNDax
Y56T5d4pl30cjJjsHbMcppq6rrnzhwkUUl85M1odMV+W351VhL2f6fyhqCW3b3yS
ZYHwDzhebkLjwGB2OaHUXksVElIdWXF6p8tUNwTrWw2SZblEuYA9rYJ8Uk0WqYAp
gki4MnHqAr+JWw1I/mCvL9J5yG1JT+Sze6KB0fWcpsRTnQtgPp2cVvnS37gbyX/7
6KSksxf005cGm59kXv8wD7bMGRv9bmRsY6bQnV+UFjtERVWuaPgYYcxoDQksgsjf
OUbyPhj2WW77/uL4p96A3eRrlHYtFexm01bj73QtpaoGoYii1bqwLIuj2USqnvYj
9h3CHJX1Hvls2A4K5lLIGUAB0wR8tkwMy8th5dp4f56zofahrZGIua0z1Ih/t1AT
o4gQRj/jjALCPeJnzGiy+WndsMxGo2uQQyxHiQ43f8erIE+OfPgEqDUrrnB51iXr
9YWVLdp6cj0sQkiVTHSLJtK2reL8kRKkEmmsvXJmlaRbxZlvfNDiPgiy2UgrIql1
EuZl3+DdJby5DRbVUNV+84ttgaggtRQp0sa+r58ds/IzsOUVPDWyIIdqFaPRhQj+
XxRhNrshL94HivNDTvhXGdM6sG+0B5hwQinzOfhFmjT03OqaTLCJaRiVrPohg4dS
rKoBKbCtqtALDlIqwoe5OP6s9f4r6IFpyl4HZ4djX+NVZBGS5tjMH2Nm5GxQ4Vhv
x5h1tFo1gUKGO9MOW+g+q3LbqViTeI1VJeAjgTvulpTIKxk2oBIs/hjonEYwwuy4
AlyMP5cBxlNPaRvMsS83aSwgcq5rIrR/HNHb1kXEz3McuVEk3GiqOU2hFHQNbndp
lXico19PD+9jfDYPQ1IZfdfc6YVjrWebK5CQwL1GG33X/rfypytb4alyzADt/25E
AJ+q9HUA05Ex19aGoMznVpNvBhlRs0wo6UczRKmY24PbXQsx/OTdEBACI4t6kS7j
W82QpYjxVclALY52zCloUx5Ju4EKTLsmRMhxSoYnUSWRv96TIk7log0bBXbrLbTg
ohf+5E2P6JDZ5oVZbI+VfU3JrsnwWXXjEZdz57u/iz46+eMDVi9tScpurgzV1Lx7
CSRUtyCuuq2ucJlB50G5TA5ymYY+yfmYciLR2E4Sys50idCeK/u+nJNapufmaFvI
OgHilTe1RlSWWwTtBTLR7N91NL4lnONC2Y8zAyDtsgGeAQVZfNr1fka53kHv+EfZ
qQpDVVIMblhr9CV10x4gaT5vXGUSDewt0/jBg/WAuXWXBaw7X1EPVS4XFBVBEhKY
L/e4YfAdw2xBEXe4p46XLM8xxYExXbFMOzezA85cnYiN40EM6Q78UqHduoxoAcxI
xZz4z78alq9dahQfvVe14Y3MVOplDZkOEtfuGjgx+njwP3HXOHCDO86zhSiI/3wx
eLa/7tw2jhTpJCQpjsEtlO14SWxn7MOwUJSetQDlxfbjxcZHqYvSiqP4EvFpRDxA
zn8=
-----END ENCRYPTED PRIVATE KEY-----
'
,
    
'bool' => true,
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #2
$input = [
  
'n_configargs' => [
    
'digest_alg' => 'sha512',
    
'private_key_bits' => 4096,
    
'private_key_type' => 'OPENSSL_KEYTYPE_RSA',
  ],
  
=> '$key',
  
=> '$out',
]
test not validated (platform dependant or random result etc.)
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