Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Decodes data encoded with MIME base64
<?php base64_decode(string $string, bool $strict = false): string|false
<?php                 throw new \RuntimeException('SHA384 is not supported by your openssl extension, could not verify the phar file integrity');

            }

            $signature = json_decode($signature, true);

            $signature = base64_decode($signature['sha384']);

            $verified = 1 === openssl_verify(file_get_contents($tempFilename), $signature, $pubkeyid, $algo);
<?php             } catch (TransportException $e) {

                continue;

            }

            if (empty($response['content']) || $response['encoding'] !== 'base64' || !($funding = base64_decode($response['content']))) {

                continue;

            }

            break;
<?php         $resource = $this->getApiUrl() . '/repos/'.$this->owner.'/'.$this->repository.'/contents/' . $file . '?ref='.urlencode($identifier);

        $resource = $this->getContents($resource)->decodeJson();

        if (empty($resource['content']) || $resource['encoding'] !== 'base64' || !($content = base64_decode($resource['content']))) {

            throw new \RuntimeException('Could not retrieve ' . $file . ' for '.$identifier);

        }
<?php         $start = '-----BEGIN PUBLIC KEY-----';

        $end = '-----END PUBLIC KEY-----';

        $pemtrim = substr($pubkeypem, strpos($pubkeypem, $start) + strlen($start), (strlen($pubkeypem) - strpos($pubkeypem, $end)) * (-1));

        $der = base64_decode($pemtrim);



        return sha1($der);

    }
<?php EOL

            ),

            'phar file' => array(

                base64_decode('IyEvdXNyL2Jpbi9lbnYgcGhwCjw/cGhwCgpQaGFyOjptYXBQaGFyKCd0ZXN0LnBoYXInKTsKCnJlcXVpcmUgJ3BoYXI6Ly90ZXN0LnBoYXIvcnVuLnBocCc7CgpfX0hBTFRfQ09NUElMRVIoKTsgPz4NCj4AAAABAAAAEQAAAAEACQAAAHRlc3QucGhhcgAAAAAHAAAAcnVuLnBocCoAAADb9n9hKgAAAMUDDWGkAQAAAAAAADw/cGhwIGVjaG8gInN1Y2Nlc3MgIi4kX1NFUlZFUlsiYXJndiJdWzFdO1SOC0IE3+UN0yzrHIwyspp9slhmAgAAAEdCTUI=')

            ),

            'shebang with strict types declare' => array(<<<'EOL'

#!/usr/bin/env php