大网数据广告活动
PHP 语言与运行手册

rnp_key_get_info · Get information about the key

· 52CE 我爱测

rnp_key_get_info — Get information about the key

rnp_key_get_info

(PECL rnp >= 0.1.1)

rnp_key_get_info — Get information about the key

Description

function rnp_key_get_info(RnpFFI $ffi, string $key_fp): array|false

Parameters

ffi

The FFI object returned by rnp_ffi_create().

key_fp

Key fingerprint.

Return Values

An associative array with information about the key or false on failure.

Key Data type Description
"is_primary" boolean true if this key is the primary key.
"is_sub" boolean true if this key is a subkey.
"is_valid" boolean true if public key is valid. This includes checks of the self-signatures, expiration times, revocations and so on.
"is_revoked" boolean true if this key is revoked.
"is_superseded" boolean true if this key is superseded. Present only if the key is revoked.
"is_compromised" boolean true if this key is compromised. Present only if the key is revoked.
"is_retired" boolean true if this key is retired. Present only if the key is revoked.
"is_expired" boolean true if this key is expired.
"have_secret" boolean true if this key has secret part.
"is_locked" boolean true if this key is currently locked. Only present for secret keys.
"is_protected" boolean true if this key is protected. Only present for secret keys. A protected key is one that is encrypted and can be safely held in memory and locked/unlocked as needed.
"have_public" boolean true if this key has public part. Generally all keys would have public part.
"valid_till" integer The timestamp till which key can be considered as valid. Note: this will take into account not only key's expiration, but revocations as well. For the subkey primary key's validity time will be also checked.
"bits" integer Number of bits in the key. For EC-based keys it will contain size of the curve.
"alg" string Key algorithm name.
"subkeys" array An indexed array containing fingerprint strings of subkeys. Only present for primary keys. Could be empty if primary key has no subkeys.
"uids" array An indexed array containing user ID strings. Only present for primary keys. Could be empty if primary key has no user ID-s.

来源:PHP Documentation Group · 作者与贡献记录 · CC BY 3.0。离线整理了版式、链接和媒体显示。

资料来源与适用范围

资料来源
PHP Documentation Group
适用范围
请按文中版本与环境说明核对
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。