PHP code example of jrglasgow / c2patool

1. Go to this page and download the library: Download jrglasgow/c2patool library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jrglasgow / c2patool example snippets


$tool = new \Jrglasgow\C2paTool\Tool(Psr\Log\LoggerInterface $logger);

$is_valid = \Jrglasgow\c2patool\Signer::validateCert($cert_file_path, $key_file_path, $cert_file);

$signer = new Jrglasgow\C2paToolSigner($tool, $cert_file_path, $key_file_path);

$success = $signer->sign($source_file, $destination_file, $manifest);