File/plugins/gpg/functions/encrypt.php

Description

gpg_encrypt_functions.php ----------- GPG plugin encryption functions

Copyright (c) 2002-2005 Braverock Ventures Copyright (c) 2007 The NaSMail Project Licensed under the GNU GPL. For full terms see the file COPYING.

  • author: Brian Peterson
  • version: $Id: encrypt.php 960 2007-10-29 19:39:52Z tokul $
Functions
gpg_clean_body (line 317)

Add another =\n sign when necessary in the ASCII Armor Data to clean up problems sometimes seen in messages from commercial PGP

Separates checksum from the rest of the Armored body.

string gpg_clean_body (string $body)
  • string $body
gpg_decrypt (line 177)

function gpg_decrypt - This function does the decryption.

This is the workhorse of the decryption side of the plugin

  • return: with results
array gpg_decrypt (string $body, string $passphrase, [optional $filename = ''], [ $outfile = ''], [ $safe_data_dir = false])
  • string $body: Body String to decrypt
  • string $passphrase: Passphrase to pass to gpg
  • optional $filename: string $filename Filename to decrypt binary file
  • $outfile
  • $safe_data_dir
gpg_encrypt (line 28)

This function does the encryption This is the workhorse of the encryption side of the plugin

Add code here to use user preferences to modify the gpg command line

  • return: with results
array gpg_encrypt (string $body,  $send_to_list, [optional $sign = false], [optional $passphrase = ''], [optional $filename = ''], string $send_to)
  • string $body: Body text string
  • string $send_to: recipient list separated by '-r '
  • optional $sign: boolean $sign (true/false) do we want to sign the message/file
  • optional $passphrase: string $passphrase passphrase string needed for signing functions
  • optional $filename: string $filename if we are going to encrypt a file
  • $send_to_list
gpg_parse_address (line 341)

This function will parse the address correctly into a recipient list for use by the calling page.

FIXME: arguments are not used

  • return: with results
array gpg_parse_address (string $send_to, string $send_to_cc, string $send_to_bcc)
  • string $send_to
  • string $send_to_cc
  • string $send_to_bcc

Documentation generated on Sun, 22 Nov 2009 17:36:27 +0200 by phpDocumentor 1.4.3