array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'function.rnp-import-keys.php', 1 => 'rnp_import_keys', 2 => 'Import keys from PHP string to the keyring and receive JSON describing new/updated keys', ), 'up' => array ( 0 => 'ref.rnp.php', 1 => 'Rnp 函数', ), 'prev' => array ( 0 => 'function.rnp-ffi-set-pass-provider.php', 1 => 'rnp_ffi_set_pass_provider', ), 'next' => array ( 0 => 'function.rnp-import-signatures.php', 1 => 'rnp_import_signatures', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/rnp/functions/rnp-import-keys.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

rnp_import_keys

(PECL rnp >= 0.1.1)

rnp_import_keysImport keys from PHP string to the keyring and receive JSON describing new/updated keys

说明

rnp_import_keys(RnpFFI $ffi, string $input, int $flags): string|false

参数

ffi

The FFI object returned by rnp_ffi_create().

input

OpenPGP packets containing key(s) to be loaded. Can be either binary or ASCII armored.

flags

See RNP_LOAD_SAVE_* predefined constants.

返回值

JSON string with information about new and updated keys on success 或者在失败时返回 false.