As a note, the docs don't show the (optional) second parameter nor mention the existence of the Phar::OPENSSL class constant also available for use with this method.To sign a phar with OpenSSL, for example...<?php$phar = new Phar('somephar.phar');// ... add your files and such$phar->setSignatureAlgorithm(Phar::OPENSSL, file_get_contents('private_key_here.pem'));// ... do whatever else you want afterwards here ...?>Hope this proves useful to someone.