downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

gnupg_seterrormode> <gnupg_keyinfo
Last updated: Fri, 14 Aug 2009

view this page in

gnupg_setarmor

(PECL gnupg >= 0.1)

gnupg_setarmorChange la sortie blindée

Description

bool gnupg_setarmor ( resource $identifier , int $armor )

Change la sortie blindée.

Liste de paramètres

identifier

L'identifiant gnupg, généré par un appel à la fonction gnupg_init() ou à la fonction gnupg.

armor

Passez une valeur entière différente de zéro à cette fonction pour activer la sortie blindée (valeur par défaut). Passez 0 pour désactiver la sortie blindée.

Valeurs de retour

Cette fonction retourne TRUE en cas de succès, FALSE en cas d'échec.

Exemples

Exemple #1 Exemple avec gnupg_setarmor() (Style procédural)

<?php
$res 
gnupg_init();
gnupg_setarmor($res,1); // Active la sortie blindée;
gnupg_setarmor($res,0); // Désactive la sortie blindée;
?>

Exemple #2 Exemple avec gnupg_setarmor() (Style orienté objet)

<?php
$gpg 
= new gnupg();
$gpg -> setarmor(1); // Active la sortie blindée;
$gpg -> setarmor(0); // Désactive la sortie blindée;
?>



add a note add a note User Contributed Notes
gnupg_setarmor
jmgorena at gmail dot com
10-Jan-2008 10:51
Take note that when ARMOR is set to OFF, the output will be BINARY. This is wanted for converting file data to a binary gpg format.

With the ARMOR set to ON, the output is ASCII. This might be used for messaging (email, IM, IRC, etc).

Example with Armor on:
-----BEGIN PGP MESSAGE-----
Version: GnuPG v1.4.6 (GNU/Linux)

hQIOA+9JbyriNorZEAf/UuCyC0T80XffXVkmewfrRSvtsYbNSGZFvSr+32jJT2fs
...
...
=YJ4D
-----END PGP MESSAGE-----

gnupg_seterrormode> <gnupg_keyinfo
Last updated: Fri, 14 Aug 2009
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites