The mgiPGP Tag

Tag Behavior

Use the mgiPGP tag to encrypt the information in the body of the tag with a passphrase. The PGP function requires a utility on the user's local computer to decrypt the text. Free PGP utilities for personal use can be found at http://web.mit.edu/network/pgp.html. Commercial PGP utilities can be found at http://www.pgp.com.


Tag Syntax

The mgiPGP tag has two forms. Each form has a beginning tag with one required parameter and two optional parameters, a body, and an ending tag. The tag forms are:

<mgiPGP passPhrase="Phrase" mode="Mode" 
suppressErrorMessage="Yes/No">
Text to encrypt
</mgiPGP>

or

<mgiPGP fileLocation="File Path" mode="Mode" 
suppressErrorMessage="Yes/No">
Text to encrypt
</mgiPGP>

Required Parameters:

  • passPhrase - The passphrase is the phrase used to encrypt the information in the body of the mgiPGP tag. If you include the passPhrase parameter, the fileLocation parameter is not required.
  • fileLocation - The fileLocation is the relative path to the file that contains the phrase used to encrypt the information in the body of the mgiPGP tag. If you include the fileLocation parameter, the passPhrase parameter is not required.

Optional Parameters:

  • mode - The mode is the function that the mgiPGP tag performs. In "encryptWithPhrase" mode, the mgiPGP tag encrypts the information in the body of the tag with the specified phrase. In "decryptWithPhrase" mode, the mgiPGP tag decrypts the information in the body of the tag with the specified phrase. The default is "encryptWithPhrase".
  • suppressErrorMessages - The suppressErrorMessages parameter determines if error messages associated with the mgiPGP tag are displayed or not displayed. If the suppressErrorMessages parameter value is "Yes", then error messages associated with the mgiPGP tag are not displayed. If the suppressErrorMessages parameter value is "No", then error messages associated with the mgiPGP tag are displayed. The default value is "No".


Example Usage and Output

<mgiSendMail to="accounting@domain.com" 
from="webmaster@domain.com"
subject="Payment" mailserver="mail@domain.com">

<mgiPGP passPhrase="Security Is Necessary 5589456">

<mgiPostArgument name="Account">
<mgiPostArgument name="CreditCardType">
<mgiPostArgument name="CreditCardNumber">
<mgiPostArgument name="ExpireMonth">
<mgiPostArgument name="ExpireYear">

</mgiPGP>
</mgiSendMail>

In this example, the mgiPGP tag is used to encrypt account payments that include credit card numbers. When an account payment is made, an encrypted email that contains the account and credit card information is sent to the accounting department. The accounting department receives the email and decrypts it using a PGP utility.


Suggested Usage

  • Secure Order Processing
  • Secure Email Transmissions


[Understanding MGI Menu] [Using MGI Menu] [Referencing MGI Menu]


[MGI Guides Main Menu] [User Guide Main Menu]