gnupg_getprotocol

(PECL gnupg >= 0.1)

gnupg_getprotocolすべての操作で現在アクティブなプロトコルを返す

説明

gnupg_getprotocol(resource $identifier): int

パラメータ

identifier

gnupg_init() あるいは gnupg のコールで得られた gnupg ID。

戻り値

現在アクティブなプロトコルを返します。結果は GNUPG_PROTOCOL_OpenPGP あるいは GNUPG_PROTOCOL_CMS のいずれかとなります。

例1 手続き型の gnupg_getprotocol() の例

<?php
$res
= gnupg_init();
echo
gnupg_getprotocol($res);
?>

例2 オブジェクト指向の gnupg_getprotocol() の例

<?php
$gpg
= new gnupg();
echo
$gpg->getprotocol();
?>

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top