显示下拉菜单

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

Example #1 : test success
Example #2 : test success
Example #3 : test not validated (platform dependant or random result etc.)
Example #4 : test not validated (platform dependant or random result etc.)
Example #1
$input = [
  
=> '_DOUBLE_QUOTES_\\xb8\\x9a\\x8c\\x26\\x19\\x0a\\x24\\xc1\\xf3\\x7a\\x9d\\x74\\xe3\\x28\\xff\\xf7\\x99\\x98\\x1d\\xd1\\xef\\xbc\\x8e\\x35\\x56\\xd5\\x41\\xe4\\x07\\xf6\\xa9\\xb7\\xc5\\x67\\xbe\\x9c\\xc1\\x91\\x61\\xbe\\x66\\x19\\x11\\x6d\\x41\\xba\\x12\\xde\\x02\\x81\\x13\\x54\\x37\\xee\\x6b\\x4c\\x2a\\xe1\\x6e\\x81\\x02\\x35\\x41\\xdc\\xea\\x81\\x7f\\xcb\\xe4\\x48\\xe8\\x59\\x6f\\x67\\xd4\\x98\\xc0\\x47\\x6f\\x6c\\x3c\\x13\\xf8\\x59\\x49\\x73\\x46\\x79\\xd2\\x45\\x5f\\x13\\x36\\x59\\x1b\\x97\\xfd\\xb4\\x16\\xa3\\xa4\\x31\\xee\\x0f\\x2c\\xbb\\x30\\x95\\x07\\xa1\\xfe\\x8e\\xe8\\x1d\\xd2\\xd7\\xce\\x22\\x7f\\xbe\\x9d\\xd9\\x6c\\x42\\x55\\x94\\xf8\\x51\\x14\\x1d\\xf7\\xf5\\x29\\x27\\xe6\\x85\\xae\\x46\\xe9\\xfa\\x93\\xf8\\xf0\\x04\\xd0\\x6c\\x9b\\x5f\\x1c\\x82\\x8a\\xa7\\x7a\\xc3\\xa9\\x16\\x51\\xd0\\xf4\\x70\\x17\\xd6\\x56\\xec\\x3b\\xf6\\xff\\x28\\xf0\\x3a\\x17\\xe4\\xb6\\xc7\\xa0\\xa8\\x75\\x0d\\x71\\x2d\\x30\\xfd\\xdd\\x5b\\xfd\\xd7\\x49\\x2c\\xa0\\x50\\x95\\x02\\xce\\x68\\xec\\x09\\xc7\\xd6\\x40\\x9b\\xb2\\x42\\xa0\\xe4\\xdd\\x60\\x10\\x65\\x60\\xba\\xe1\\x56\\xae\\xed\\xe1\\xa8\\xf2\\x46\\x5a\\x54\\x9b\\x0e\\xfa\\xb4\\xe9\\x6f\\xaa\\x8e\\xce\\xff\\x88\\xca\\x33\\xd6\\x4c\\x39\\xfb\\x8e\\xfc\\x33\\x44\\x0b\\x79\\x98\\x8f\\x19\\x4a\\x34\\x80\\xd5\\x11\\x4a\\x78\\x92\\x18\\x8b_DOUBLE_QUOTES_',
  
=> '$decrypted',
  
=> 'file:///tmp/private-key.pem',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'decrypted' => 'this is some data',
    
'bool' => true,
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #2
$input = [
  
'base64' => 'uJqMJhkKJMHzep104yj/95mYHdHvvI41VtVB5Af2qbfFZ76cwZFhvmYZEW1BuhLeAoETVDfua0wq4W6BAjVB3OqBf8vkSOhZb2fUmMBHb2w8E/hZSXNGedJFXxM2WRuX/bQWo6Qx7g8suzCVB6H+jugd0tfOIn++ndlsQlWU+FEUHff1KSfmha5G6fqT+PAE0GybXxyCiqd6w6kWUdD0cBfWVuw79v8o8DoX5LbHoKh1DXEtMP3dW/3XSSygUJUCzmjsCcfWQJuyQqDk3WAQZWC64Vau7eGo8kZaVJsO+rTpb6qOzv+IyjPWTDn7jvwzRAt5mI8ZSjSA1RFKeJIYiw==',
  
=> '$data',
  
=> '$decrypted',
  
=> 'file:///tmp/private-key.pem',
]
$expected_output = $test_output
$test_output = [
  
'result' => [
    
'data' => '&
$zt(.5VAgafmAT7kL*n5AHYogԘGol<YIsFyE_6Y1,0"lBUQ)\'慮Fl_zéQpV;(:Ǡu q-0[I,Ph    @B`e`VFZTo3L93D yJ4Jx'
,
    
'decrypted' => 'this is some data',
    
'bool' => true,
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #3
$input = [
  
'e_data' => 'this is some data',
  
'e_key' => 'file:///tmp/public-key.pem',
  
'base64' => '$base64',
  
=> '$data',
  
=> '$decrypted',
  
=> 'file:///tmp/private-key.pem',
]
test not validated (platform dependant or random result etc.)
$test_output = [
  
'result' => [
    
'e_bool' => true,
    
'data' => 'N}:' "\0" '##_\'f*C
slTwڿq?m@6n,;BC4iP7 [?|@:kBjOG|Y֝c-o>i_p\'u<
9l~Oc+~K\\qO5AZϾʎ֟NgTɊ__^֤}5͕G䞼Rc3eޤeE61yFyUߔ    (X'
,
    
'base64' => 'yU6IfToAIw77lSOd1l8nDoBm29oqrkOxk5cKc2xU2v3tdw/luhPN2r8RcT9trBHz8pXdHqXv8EA2424sO0JDNJhpvVC9yjcD4KbLyuYMgqnyl9ZbP/G/gHy3w+noQOS/0DprQsdq5NJPxB1HoXxZD9ady2MtuW+csj7Haadf4XAPohgnrJv+EBP5E8V1PBzWCoo5t2y7F37ET2PUK35LFPlccU8W4TWIwEHDWs++yo7Wn071gWeoVMmKX19e28rO1qSXfTXuzZUHG0eSwaEWthi23eC05J68UmOH9DMWZZXv574Dq7nepGVFkbY2HwIxAvZ500bmeVXH35S8CSjRWA==',
    
'decrypted' => 'this is some data',
    
'bool' => true,
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]
Example #4
$input = [
  
'e_data' => 'this is some data',
  
'e_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-----'
,
  
=> '$data',
  
=> '$decrypted',
  
=> '-----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' => [
    
'e_bool' => true,
    
'data' => '֠idsh 8Ĉ;8tr݃-6v6)
ҿ }i۷kMme|;uvz_Y?W֔9 uq0a7kT=/ޭ6ltsw_Ѯn4ΒVl)Ι\'8T?|:%-b;Z\\6Jۧz?j6XXA ' 
"\0" 'ޮilZO3"mď髦%룖J',
    
'base64' => 'GfsE0e3WoBxpZHMUaPe9vgUCCzilxIj09dE7OHS+vPpy3YMtAjZ2BzYpkAqjjILSv7MLfRHLadu3nmvEDhWITfjBk23+ZY+KfDsadXb93PXSehkIhOqFX1mTmT+cV9aU87w5DHVxMGGT5Teya9VUHLSWPS/erfEENpxsf3QIc99/d1/p0a5uzjSaFs6St1Zsla0pGfzOmQG9BOPNGB67J6Gov444jlQejT98OvglLamUhZSHgGKV7TvY7fsdnFpcuRr52x02StunesI/h2rLNu8V3AivgFhYi0GwDPUA4d6uaRJsnFr4BYbST+bOM+sikm3Ej4bpq6Yl66OWShIW7w==',
    
'decrypted' => 'this is some data',
    
'bool' => true,
  ],
  
'php_version' => '7.1.33 Linux x86_64',
]