php8.5
Home/ Manual/ gnupg / functions/ gnupg_keyinfo

gnupg_keyinfo

PHP function Edit on GitHub ✎

(PECL gnupg >= 0.1)

Returns an array with information about all keys that matches the given pattern

Description

gnupg_keyinfo(resource $identifier, string $pattern): array|false

Parameters

identifier

Identifier

pattern

The pattern being checked against the keys.

Return Values

Returns an array with information about all keys that matches the given pattern or false, if an error has occurred.

Examples

Procedural gnupg_keyinfo() example

php
<?php
$res = gnupg_init();
$info = gnupg_keyinfo($res, 'test');
print_r($info);
?>

OO gnupg_keyinfo() example

php
<?php
$gpg = new gnupg();
$info = $gpg->keyinfo("test");
print_r($info);
?>

Source: reference/gnupg/functions/gnupg-keyinfo.xml · from the official PHP manual (php/doc-en)