EasyByte Software

Welcome to EasyByte Software

Home Buy Online Products Downloads Support
Sections
Index
About
Installation
Properties
Methods
ASP and dotNET
Further Information
  

 

 

PGPFileDecrypt Method
 
     

Cryptocx v7 User Guide

 

PGPFileDecrypt Method

This is the method that you use to decrypt a PGP encrypted file. This method is complementary to the PGPFileEncrypt method.

 

Description

Decrypts a PGP encrypted file.

     
Syntax

x = object.PGPFileDecrypt

The syntax of the PGPFileDecrypt method has these parts:

 
Part Description
object A Cryptocx v7 control.
x A string that becomes either "TRUE" or "Error: xxx" where xxx is the error message.

       
Remarks If for whatever reason the method fails to complete, the method will return some text stating exactly what has gone wrong, if the method runs ok then the output from the method will = "TRUE".

This method requires the use of a secret key ring, you have to specify the directory in which the secret key ring resides though the KeyFolder property. Cryptocx will automatically search through the secret ring in the specified directory to find the required key.

You need to specify the Password of the secret key that is needed.

You need to specify the file to decrypt, the SourceFile.

You need to specify where the result of decryption will go, the DestinationFile.

       
Returns

String

     
Example Sample Visual Basic Code to decrypt a PGP encrypted file:

Where Cryptocx1 is an instance of a Cryptocx Control.

Dim theResult As String

Cryptocx1.KeyFolder = "C:\mykeys\"
Cryptocx1.Password = "mypass"
Cryptocx1.SourceFile = "C:\fileToDecrypt.txt"
Cryptocx1.DestinationFile = "C:\decrypted.txt"
theResult = Cryptocx1.PGPFileDecrypt

'' Check to see what has happened
''

If theResult = "TRUE" Then
 '' Ok, the Decryption went well with no errors
Else
 MsgBox theResult
End If

 

 

 

 

Back to Contents Page

 

Click here to set this great site as your home page

Or click here to add it to your Favorites.

  
  
 

Copyright (c) EasyByte Software 1998-2008, info@easybyte.com