Please wait while we load your page...

PasswordSentry

Latest Version [8.00202205221] Last Updated [May-22-2022]

Tools

PHP Manual [gnupg_getprotocol]

Protect Your Website Today


PHP Manual || GnuPG Functions

(PECL gnupg >= 0.1)

gnupg_getprotocolReturns the currently active protocol for all operations

Description

gnupg_getprotocol ( resource $identifier ) : int

Parameters

identifier

The gnupg identifier, from a call to gnupg_init() or gnupg.

Return Values

Returns the currently active protocol, which can be one of GNUPG_PROTOCOL_OpenPGP or GNUPG_PROTOCOL_CMS.

Examples

Example #1 Procedural gnupg_getprotocol() example

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

Example #2 OO gnupg_getprotocol() example

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



PHP Manual || GnuPG Functions