( ! ) Warning: Creating default object from empty value in /var/www/clients/client1/web1/web/modules/Forums/common.php on line 421
Call Stack
#TimeMemoryFunctionLocation
10.0000358440{main}( ).../modules.php:0
20.0785369384include( '/var/www/clients/client1/web1/web/index.php ).../modules.php:4
30.2975675920include( '/var/www/clients/client1/web1/web/modules/PHP_Manual/index.php ).../index.php:179
40.2980676832include( '/var/www/clients/client1/web1/web/header.php ).../index.php:157
50.2980693432head( ).../header.php:112
60.2981694016online( ).../header.php:39
70.2981694016my_online( ).../mainfile.php:720
80.2981697192include( '/var/www/clients/client1/web1/web/modules/Forums/common.php ).../custom_mainfile.php:1151
Omega13a's Corner - PHP Manual - Reference - Gnupg
Omega13a's Corner
Contribute To This Site
Submit a Download
Submit a Link
Submit A Review for Omega13a's Corner

This Website Is Best Viewed In Mozilla Firefox 0.9+
You Are Currently Using
  Login or Register
::  Home   ::  Your Account   ::  Forums   ::  UFT Encyclopedia   ::  UFT Writer  ::
2020.8
Omega13a's Wish List
My Amazon.com Wish List
 
Affiliates
Supported by

[ Be A Supporter ]
[ NukeSupporters( tm) ]
 
Navigation
· Hom e
· Rep ort An Error

Omega13a's Corner

· Ome ga13a's Corner Index
· Ana grams
· Ana grams
· Aut ograms
· Aut ograms
· Bum per Stickers
· Bum per Stickers
· Cow Analogies
· Cow Analogies
· Cru el Baby Names
· Cru el Baby Names
· DHT ML Tricks
· DHT ML Tricks
· Dum b Criminals
· Dum b Criminals
· Dum b Headlines
· Dum b Headlines
· Dum b Laws
· Dum b Laws
· Dum b Questions
· Dum b Questions
· Dum b Quotes
· Dum b Quotes
· Dum b Signs
· Dum b Signs
· Dum b Warning Labels
· Dum b Warning Labels
· Eye witness Reports
· Eye witness Reports
· Fea rs
· Fea rs
· Gam es
· Gam es
· Goo gle Searches
· Goo gle Searches
· Gra phing Calculator
· Gra phing Calculator
· Hor oscope
· Hor oscope
· hta ccess Tutorials
· hta ccess Tutorials
· HTM L Manual
· HTM L Manual
· IP Lookup
· IP Lookup
· Jok es
· Jok es
· Mis c Funny Stuff
· Mis c Funny Stuff
· Odd Books
· Odd Books
· Odd Place Names
· Odd Place Names
· Odd Product Names
· Odd Product Names
· Our Solar System
· Our Solar System
· Pal indromes
· Pal indromes
· Pan grams
· Pan grams
· PEA R Manual
· PEA R Manual
· PHP Manual
· PHP Manual
· PHP Nuke Tools
· PHP Nuke Tools
· Poi ntless Quizzes
· Poi ntless Quizzes
· Pri me Numbers
· Pri me Numbers
· Ran dom Quotes
· Ran dom Quotes
· Ran t
· Ran t
· Rev iews
· Rev iews
· Rhy ming Pairs
· Rhy ming Pairs
· Sci -Fi/Fantasy Encyclopedia
· Sci -Fi/Fantasy Encyclopedia
· Wea ther
· Wea ther
· Wei rd Ads
· Wei rd Ads
· Wei rd Wide Web
· Wei rd Wide Web
· Zen Sarcasms
· Zen Sarcasms

Star Trek

·&nbs pBorg Species Designations
· Bor g Species Designations
· FAQ
· FAQ
· Sev Trek
· Sev Trek
· Sta r Trek Alien Sayings
· Sta r Trek Alien Sayings
· Sta r Trek Eggs
· Sta r Trek Eggs
· Sta r Trek Encyclopedia
· Sta r Trek Encyclopedia
· Sta r Trek Episode Guides
· Sta r Trek Episode Guides
· Sta r Trek Goofs
· Sta r Trek Goofs
· Sta r Trek Mysteries
· Sta r Trek Mysteries
· Sta r Trek Reviews
· Sta r Trek Reviews
· Sta r Trek Timeline
· Sta r Trek Timeline
· Tre k Today Headlines
· Tre k Today Headlines
· Wor lds in Star Trek
· Wor lds in Star Trek

Community

· Cha t Bot
· Cha t Bot
· Cha t Room
· Cha t Room
· Fee dback
· Fee dback
· For ums
· For ums
· Gue stbook
· Gue stbook
· Joi n a Webring
· Joi n a Webring
· Joi n the Staff
· Joi n the Staff
· Mem bers List
· Mem bers List
· Pri vate Messages
· Pri vate Messages
· Rec ommend Us
· Rec ommend Us
· Rul es/Terms of Use
· Rul es/Terms of Use
· Sur veys
· Sur veys
· Use r Journals
· Use r Journals
· Vot e For Us
· Vot e For Us
· Win An Award
· Win An Award
· You r Account
· You r Account

Media/Arts

· Dow nloads
· Dow nloads
· Fan Fictions
· Fan Fictions
· Han gman
· Han gman
· Ima ge Gallery
· Ima ge Gallery
· Tec hnobable Generator
· Tec hnobable Generator

Staff Personal Sections

· Lad y Lursa's Reading Corner

Links and Webrings

· Ban ner Exchanges
· Ban ner Exchanges
· Joi n Banner Exchange
· Joi n Banner Exchange
· Lin king To Us
· Lin king To Us
· Top sites
· Top sites
· Web Links
· Web Links
· Web rings
· Web rings

Site Info

· Abo ut the Owner
· Abo ut the Site
· Abo ut the Site
· Abo ut UFT_PHP
· Abo ut UFT_PHP
· Abo ut You
· Awa rds
· Awa rds
· Ban ned Stuff
· Ban ned Stuff
· Cop yright
· Cop yright
· Leg al Information
· Leg al Information
· Mod ifications Installed
· Mod ifications Installed
· Sea rch Results
· Sea rch Results
 
UFT Community

Omega13a's Corner Forums

 
Vote For Us
 
Ads


gnupg Functions

LI. gnupg Functions

Introduction

This module allows you to interact with gnupg.

Warning

This extension is EXPERIMENTAL. The behaviour of this extension -- including the names of its functions and anything else documented about this extension -- may change without notice in a future release of PHP. Use this extension at your own risk.

Requirements

The gnupg extension requires PHP 4.3. To use this extension in an OO style, PHP 5 is required.

This extension requires the gpgme library

Installation

The gnupg_extension is not bundled with PHP. It is a PECL extension and can be located here: http://pecl.php.net/package/gnupg.

Predefined Constants

GNUPG_SIG_MODE_NORMAL (integer)

GNUPG_SIG_MODE_DETACH (integer)

GNUPG_SIG_MODE_CLEAR (integer)

GNUPG_VALIDITY_UNKNOWN (integer)

GNUPG_VALIDITY_UNDEFINED (integer)

GNUPG_VALIDITY_NEVER (integer)

GNUPG_VALIDITY_MARGINAL (integer)

GNUPG_VALIDITY_FULL (integer)

GNUPG_VALIDITY_ULTIMATE (integer)

GNUPG_PROTOCOL_OpenPGP (integer)

GNUPG_PROTOCOL_CMS (integer)

GNUPG_SIGSUM_VALID (integer)

GNUPG_SIGSUM_GREEN (integer)

GNUPG_SIGSUM_RED (integer)

GNUPG_SIGSUM_KEY_REVOKED (integer)

GNUPG_SIGSUM_KEY_EXPIRED (integer)

GNUPG_SIGSUM_KEY_MISSING (integer)

GNUPG_SIGSUM_SIG_EXPIRED (integer)

GNUPG_SIGSUM_CRL_MISSING (integer)

GNUPG_SIGSUM_CRL_TOO_OLD (integer)

GNUPG_SIGSUM_BAD_POLICY (integer)

GNUPG_SIGSUM_SYS_ERROR (integer)

GNUPG_ERROR_WARNING (integer)

GNUPG_ERROR_EXCEPTION (integer)

GNUPG_ERROR_SILENT (integer)

Notes

This extension makes use of the keyring of the current user. This keyring is normally located in ~.gnupg/. To specify a custom location, store the path to the keyring in the environment variable GNUPGHOME. See putenv for more information how to do this.

Some functions require the specification of a key. This specification can be anything that refers to an unique key (userid, key_id, fingerprint, ...). This documentation uses the fingerprint in all examples.

keylistiterator

This extension also comes with an Iterator for your keyring.
<?php
// create a new iterator for listing all public keys that matches 'example'
$iterator = new gnupg_keylistiterator("example");
foreach(
$iterator as $fingerprint => $userid){
    echo
$fingerprint." -> ".$userid."\n";
}
?>

Examples

This example will clearsign a given text.

Example 1. gnupg clearsign example (procedural)

<?php
// init gnupg
$res = gnupg_init();
// not really needed. Clearsign is default
gnupg_setsignmode($res,GNUPG_SIG_MODE_CLEAR);
// add key with passphrase 'test' for signing
gnupg_addsignkey($res,"8660281B6051D071D94B5B230549F9DC851566DC","test");
// sign
$signed = gnupg_sign("just a test");
echo
$signed;
?>

Example 2. gnupg clearsign example (OO)

<?php
// new class
$gnupg = new gnupg();
// not really needed. Clearsign is default
$gnupg->setsignmode(gnupg::SIG_MODE_CLEAR);
// add key with passphrase 'test' for signing
$gnupg->addsignkey("8660281B6051D071D94B5B230549F9DC851566DC","test");
// sign
$signed = $gnupg->sign("just a test");
echo
$signed;
?>
Table of Contents
gnupg_adddecryptkey -- Add a key for decryption
gnupg_addencryptkey -- Add a key for encryption
gnupg_addsignkey -- Add a key for signing
gnupg_cleardecryptkeys -- Removes all keys which were set for decryption before
gnupg_clearencryptkeys -- Removes all keys which were set for encryption before
gnupg_clearsignkeys -- Removes all keys which were set for signing before
gnupg_decrypt -- Decrypts a given text
gnupg_decryptverify -- Decrypts and verifies a given text
gnupg_encrypt -- Encrypts a given text
gnupg_encryptsign -- Encrypts and signs a given text
gnupg_export -- Exports a key
gnupg_geterror -- Returns the errortext, if a function fails
gnupg_getprotocol -- Returns the currently active protocol for all operations
gnupg_import -- Imports a key
gnupg_keyinfo -- Returns an array with information about all keys that matches the given pattern
gnupg_setarmor -- Toggle armored output
gnupg_seterrormode -- Sets the mode for error_reporting
gnupg_setsignmode -- Sets the mode for signing
gnupg_sign -- Signs a given text
gnupg_verify -- Verifies a signed text

Total Hits: 0

Powered by PHPNukePage Protected By Copyscape. Do Not CopyNukeSentinel ProtectedPowered by PEARPowered by PECL

© 2000, 2001, 2002 Trek Archive, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 United Federation of Trek.
Omega's Corner is © 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 omega13a.
Star Trek®, Star Trek: The Next Generation®, Star Trek: Deep Space Nine®, Star Trek: Voyager®, Enterprise®, and Star Trek: Enterprise® are registered trademarks of Paramount Pictures and Viacom. All Star Trek material found on this site is for promotional purposes only, and not personal or financial gain. No infringements on their copyrights is intended.
All logos and trademarks in this site are property of their respective owners. The comments are property of their posters.


ROR Sitemap Google Sitemap

PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.2777 Seconds
Server Load: 6.53
Queries: 24 (0.1927 seconds)
Included 92 files
242 classes defined
46 interfaces defined
0 classes loaded using __autoload()
2,724 functions defined
4,460 constants defined

:: subBlack phpbb2 style by spectre :: PHP-Nuke theme by www.nukemods.com ::

This Website Is Best Viewed In Mozilla Firefox 0.9+
You Are Currently Using

UFT's Webring of Sci-Fi and Fantasy
UFT's Webring of Sci-Fi and Fantasy
Previous site : Random : Next site : List sites
Powered by PHP-Ring
Psychology News
Scitrek webring
Scitrek webring
Previous site : Random : Next site : List sites
Powered by .PHP-Ring
Psychology News
robots.txt
Contributors Contact Us