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-11-05 22:05:45 UTC


README

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());
        }
    }
}