EasyByte Software

Welcome to EasyByte Software

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

 

 

PGPEncryptSignFile Method
 
     

Cryptocx v7 User Guide

 

PGPEncryptSignFile Method

This is the method that you use to encrypt and digitally sign a file. You need to have a secret keyring that you know the password to, to use this function and also a public key to encrypt the file.

 

Description

Encrypts and digitally signs a file

     
Syntax

x = object.PGPEncryptSignFile

The syntax of the PGPEncryptSignFile 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 You need to have a secret keyring, with a secret key you know the password to, to be able to use this method.

To decrypt the file and verify the signature, you just need to decrypt the signed file using the PGPDecryptVerifyFile method.

You must specify what file to sign, the SourceFile.

You must specify what the signed file will be called, the DestinationFile

You must specify the Password of the secret key you are using.

You must specify the KeyFolder, where the secret keyring is located.

You must specify the KeyID of the public key you would like to use to encrypt the file.

You must specify the SignID of the secret key you would like to use to sign the encrypted file.

       
Returns

String

     
Example Sample Visual Basic Code to encrypt and digitally sing a file.

Where Cryptocx1 is an instance of a Cryptocx Control.

Dim x as String

Cryptocx1.SourceFile = txtSourceFile.Text
Cryptocx1.DestinationFile = txtDestinationFile.Text
Cryptocx1.Password = txtPassword.Text
Cryptocx1.KeyFolder = txtKeyring.Text
Cryptocx1.KeyID = txtEncryptID.Text
Cryptocx1.SignID = txtSignID.Text

x  = Cryptocx1.PGPEncryptSignFile

If x = "TRUE" Then
  '' Alls ok, the file was encrypted and signed
Else
  MsgBox x
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