gnupg_getprotocol
PHP function
Edit on GitHub ✎
(PECL gnupg >= 0.1)
Returns the currently active protocol for all operations
Description
gnupg_getprotocol(resource $identifier): int
Parameters
identifierIdentifier
Return Values
Returns the currently active protocol, which can be one of GNUPG_PROTOCOL_OpenPGP or GNUPG_PROTOCOL_CMS.
Examples
Procedural gnupg_getprotocol() example
php
<?php
$res = gnupg_init();
echo gnupg_getprotocol($res);
?>OO gnupg_getprotocol() example
php
<?php
$gpg = new gnupg();
echo $gpg->getprotocol();
?>