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-12-05 22:19:55 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());
        }
    }
}