lifeofguenter/php-gpg-keyinfo

A gpg --with-colons parser.

0.0.5 2021-12-05 15:05 UTC

This package is auto-updated.

Last update: 2024-07-05 21:07:26 UTC


README

php-gpg-keyinfo

Usage

require 'vendor/autoload.php';

use NINEJKH\GPGkeyinfo\Parser;

$parser = new Parser(file_get_contents(__DIR__ . '/example.txt'));

foreach ($parser as $keyinfo) {
    var_dump($keyinfo);

    foreach ($keyinfo as $record) {
        if ($record->hasCapabilities()) {
            var_dump($record->canEncrypt());
        }
    }
}