Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

gnupg_verify(3) [php man page]

GNUPG_VERIFY(3) 							 1							   GNUPG_VERIFY(3)

gnupg_verify - Verifies a signed text

SYNOPSIS
array gnupg_verify (resource $identifier, string $signed_text, string $signature, [string &$plaintext]) DESCRIPTION
Verifies the given $signed_text and returns information about the signature. PARAMETERS
o $identifier -The gnupg identifier, from a call to gnupg_init(3) or gnupg. o $signed_text - The signed text. o $signature - The signature. To verify a clearsigned text, set signature to FALSE. o $plaintext - The plain text. If this optional parameter is passed, it is filled with the plain text. RETURN VALUES
On success, this function returns information about the signature. On failure, this function returns FALSE. EXAMPLES
Example #1 Procedural gnupg_verify(3) example <?php $plaintext = ""; $res = gnupg_init(); // clearsigned $info = gnupg_verify($res,$signed_text,false,$plaintext); print_r($info); // detached signature $info = gnupg_verify($res,$signed_text,$signature); print_r($info); ?> Example #2 OO gnupg_verify(3) example <?php $plaintext = ""; $gpg = new gnupg(); // clearsigned $info = $gpg -> verify($signed_text,false,$plaintext); print_r($info); // detached signature $info = $gpg -> verify($signed_text,$signature); print_r($info); ?> PHP Documentation Group GNUPG_VERIFY(3)

Check Out this Related Man Page

GNUPG_ENCRYPTSIGN(3)							 1						      GNUPG_ENCRYPTSIGN(3)

gnupg_encryptsign - Encrypts and signs a given text

SYNOPSIS
string gnupg_encryptsign (resource $identifier, string $plaintext) DESCRIPTION
Encrypts and signs the given $plaintext with the keys, which were set with gnupg_addsignkey and gnupg_addencryptkey before and returns the encrypted and signed text. PARAMETERS
o $identifier -The gnupg identifier, from a call to gnupg_init(3) or gnupg. o $plaintext - The text being encrypted. RETURN VALUES
On success, this function returns the encrypted and signed text. On failure, this function returns FALSE. EXAMPLES
Example #1 Procedural gnupg_encryptsign(3) example <?php $res = gnupg_init(); gnupg_addencryptkey($res,"8660281B6051D071D94B5B230549F9DC851566DC"); gnupg_addsignkey($res,"8660281B6051D071D94B5B230549F9DC851566DC","test"); $enc = gnupg_encryptsign($res, "just a test"); echo $enc; ?> Example #2 OO gnupg_encryptsign(3) example <?php $gpg = new gnupg(); $gpg -> addencryptkey("8660281B6051D071D94B5B230549F9DC851566DC"); $gpg -> addsignkey("8660281B6051D071D94B5B230549F9DC851566DC","test"); $enc = $gpg -> encryptsign("just a test"); echo $enc; ?> PHP Documentation Group GNUPG_ENCRYPTSIGN(3)
Man Page

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

manipulate a passed in parameter

I am passing a file name as a parameter to shell script the parameter is getfile.txt.gpg how do i process this parameter to get name like getfile.txt only and eleminate the .gpg text?? Thanks in advance (2 Replies)
Discussion started by: rudoraj
2 Replies

2. Post Here to Contact Site Administrators and Moderators

Signatures

Hi is it possible to add signatures? I have found option in profile config to enable it but no option to set it for my account. I have found some discussion form 2007. https://www.unix.com/post-here-contact-site-administrators-moderators/39610-signatures.html Is it true signatures are... (8 Replies)
Discussion started by: gito
8 Replies

3. UNIX for Dummies Questions & Answers

Like to find text info from a list From-To

Wrong form sorry Can be deleted (1 Reply)
Discussion started by: Jotne
1 Replies

4. Linux

How to run commands with pipe from text file?

Hello, I have standard loop while read -r info; do command $info done < info in info text file I have multiple commands each on line that I want to execute. When I used them in console they worked, but not with this loop. This is one of the commands in info file: grep... (4 Replies)
Discussion started by: adamlevine
4 Replies

5. UNIX for Beginners Questions & Answers

Create signature

I saw this and am wondering how I can add a signature so it shows on my posts. Thanks. Visible Post Elements You have the option to show or hide various elements of messages, which may be of use to users on slow internet... (1 Reply)
Discussion started by: drew77
1 Replies