Welcome to GuardiansWorlds.com
 
 

  User Info Box

Anonymous
18.225.72.82
Nickname:

Password:

Security Code:
Security Code
Type Security Code:


User Stats:
Today: 0
Yesterday: 0
This Month: 0
This Year: 0
Total Users: 117
New Members:
Online Now:
  Guests: 30
18.225.xx.xx
85.208.xx.xxx
165.227.xxx.xx
206.189.x.xx
172.71.xxx.xxx

  Total Online: 30
Server Time:
Apr 03, 2025
11:05 pm UTC
 

  Modules/Site Links

· Home
· Bible-MM
· Birds-MM
· Car_Show-MM
· Christmas-MM
· Content
· Domaining-MM
· Downloads
· Drugs-MM
· Event Calendar
· FAQ
· Feedback
· Fish-MM
· Gambling_Guide-MM
· Guardians Worlds Chat
· HTML_Manual
· Internet_Traffic_Report
· IP_Tracking Tool
· Journal
· Members List
· Movies-MM
· Music_Sound-MM
· NukeSentinel
· PHP-Nuke_Tools
· PHP_Manual-MM
· PING Tool
· Private Messages
· Recommend Us
· Reptiles-MM
· Search
· SEO_Tools
· Statistics
· Stories Archive
· Submit News
· Surveys
· Top 30
· Topics
· Visitor Mapping System
· Web Links
· Webcams
· Web_Development-MM
· YahooNews
· YahooPool
· Your Account
 

  Categories Menu

· All Categories
· Camaro and Firebird
· FTP Server
· New Camaro
· News
· Online Gaming
 

  Survey

Which is your favorite generation Camaro or Firebird?

1st Gen. 67-69 Camaro
2nd Gen. 70-81 Camaro
3rd Gen. 82-92 Camaro
4th Gen. A 93-97 Camaro
4th Gen. B 98-2002 Camaro
1st Gen. 67-69 Firebird
2nd Gen. 70-81 Firebird
3rd Gen. 82-92 Firebird
4th Gen. A 93-97 Firebird
4th Gen. B 98-2002 Firebird



Results
Polls

Votes: 66
Comments: 0
 

  Cluster Maps

Locations of visitors to this page
 

  Languages

Select Interface Language:

 

 
  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
 
 


 
  Disipal DesignsAnti-Spam
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © 2002 by me.
You can syndicate our news using the file backend.php or ultramode.txt This site contains info,links,chat,message board/forum for online games,gaming,other features.Check out my servers and stats for Killing Floor, Quake3 Rocket Arenas & Deathmatch,Trade Wars 2002 & FTP server.Camaro/Firebirds, car info.