PHPize Online / SQLize Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php $publicKey = <<<PUBLIC_KEY -----BEGIN PUBLIC KEY----- MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAzKfBx4WwUIhrRvPvMojK LWYHOly1UwJUzK41pSFGNbuiTFY1YRYR8GfF8vG1jaMTq83h5uVMOJMIS1jHzW87 uATIDz00Se0Cr/pYEv58qzWw/5v8BqbdzQpqYIitAgCXHKvlHWSCOYClec1oO8vl btDmhfvPVtoHR91OTTHIQlMeSBOU26zre6pZaQxVdWP/p0hZ6JPt8Fd8kObbxhPe 02YKs4eu9fCeCSKnDDdnnlK5PR462YuefezHcswwWnrRmWrogtNmPR12IcnZyP3d q9fH+gZUTTP7q6Gs/RLcLszpMS4Qh59aSa3gUR0xUWqxfkj62o53eJNTcrpCAl8w 3hgkruoptvG/NU9sP6tcFGIJ2+dGq5VqjDNVOCNKzyuZmPaUe/qLEDQS51lfAFRN i4MfsSKusArB3MpBsclqzlO/9amPE1qdNUGbKj2AYfOcFGkIW12JLpMMsfNiFNK3 LDXqaxpVNAnBPjL5rBFNS5P7yNi+tMEIJAxJrIp/FB6lAgMBAAE= -----END PUBLIC KEY----- PUBLIC_KEY; $header = 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9Cg'; $payload = 'eyJyb2xlIjoic3BvbnNvciIsIm5hbWUiOiJKb2huRG9lIiwiZXhwaXJlZCI6MTY4ODUzMjc0M30K'; $data = "$header.$payload"; $signature = "CdumY0hjQuj3W9don65LaaW8MZJuLrpbCTwjKcN1uQkqLmb0ZET7AipF564zTSYIUfaVcTLST444OQQIv25ouc8okOgXnCd7xRdh7STyrap4ig5d2G6e4aRVgVGgk1JnU-oemD73fpMxFrgbfHI4PHXw3Ea2udI3_-r1MoS9F7OIwj7fPdQokM0e1gW-WiAhqlDzeTPGX92NZD_EnSpe36-4okIkDcccd1AB8fIsT2O1sYVi-gN2N9tFaIdwG2smV6kTRTtbSN1HncXbvykm8xP8qrMaOFSeBvcBnf8otzdGCbNeyyEoTyZMdaOiDztLSJbE-6OiB2UzUumcIrsKhLN6IKgPisGvIassySuH0EA5PkjRbUTge2wafScgWn6tInoVrFHmlN3BIdJi7mcnYxUOUcX-aaobmaSYzeb9raTcyEeOiVcDwPPml98hEAOIee0lE0z_7LZU1H0lPSUTzNPOYWrYn657htFBw80-wmV4z2zPzKCePlpBABhS_Jmu"; $verify = openssl_verify( $data, base64_decode(\strtr($signature, '-_', '+/')), $publicKey, "SHA256" ); echo base64_decode(\strtr($header, '-_', '+/')); echo base64_decode(\strtr($payload, '-_', '+/')); // echo base64_decode(\strtr($signature, '-_', '+/')); var_export($verify);
Show:  
Copy Clear