Starksoft.Cryptography.OpenPGP Event arguments class for the DecryptAsyncCompleted event. Constructor. Exception information generated by the event. Cancelled event flag. This flag is set to true if the event was cancelled. Collection of PGP keys stored in the GnuPGP application. Constructor. StreamReader object containing GnuPG raw key stream data. Searches for the specified GnuPGKey object and returns the zero-based index of the first occurrence within the entire GnuPGKeyCollection colleciton. The GnuPGKeyobject to locate in the GnuPGKeyCollection. The zero-based index of the first occurrence of item within the entire GnuPGKeyCollection, if found; otherwise, –1. Retrieves the specified GnuPGKey object by zero-based index from the GnuPGKeyCollection. Zero-based index integer value. The GnuPGKey object corresponding to the index position. Adds a GnuPGKey object to the end of the GnuPGKeyCollection. GnuPGKey item to add to the GnuPGKeyCollection. Convert current GnuPGKeyCollection to a DataTable object to make data binding a minpulation of key data easier. Data table object. Raw key stream text data. Gets the number of elements actually contained in the GnuPGKeyCollection. Indexer for the GnuPGKeyCollection collection. Zero-based index value. Event arguments class for the EncryptAsyncCompleted event. Constructor. Exception information generated by the event. Cancelled event flag. This flag is set to true if the event was cancelled. Event arguments class for the SignAsyncCompleted event. Constructor. Exception information generated by the event. Cancelled event flag. This flag is set to true if the event was cancelled. GnuPG output itemType. Ascii armor output. Binary output. Interface class for GnuPG. GNU Privacy Guard from the GNU Project (also called GnuPG or GPG for short) is a highly regarded and supported opensource project that provides a complete and free implementation of the OpenPGP standard as defined by RFC2440. GnuPG allows you to encrypt and sign your data and communication, manage your public and privde OpenPGP keys as well as access modules for all kind of public key directories. GPG.EXE and GPG2.EXE, is a command line tool that is installed with GnuPG and contains features for easy integration with other applications. The Starksoft OpenPGP Component for .NET provides classes that interface with the GPG.EXE command line tool. The Starksoft OpenPGP libraries allows any .NET application to use GPG.EXE to encrypt or decypt data using .NET IO Streams. No temporary files are required and everything is handled through streams. Any .NET Stream object can be used as long as the source stream can be read and the destination stream can be written to. But, in order for the Starksoft OpenPGP Component for .NET to work you must first install the lastest version of GnuPG which includes GPG.EXE. You can obtain the latest version at http://www.gnupg.org/. See the GPG.EXE or GPG2.EXE tool documentation for information on how to add keys to the GPG key ring and creating your public and private keys. If you are new to GnuPG please install the application and then read how to generate new key pair or importing existing OpenPGP keys. You can rad more about key generation and importing at http://www.gnupg.org/gph/en/manual.html#AEN26 Encrypt File Example: // create a new GnuPG object GnuPG gpg = new GnuPG(); // specify a recipient that is already on the key-ring gpg.Recipient = "myfriend@domain.com"; // create an IO.Stream object to the source of the data and open it FileStream sourceFile = new FileStream(@"c:\temp\source.txt", FileMode.Open); // create an IO.Stream object to a where I want the encrypt data to go FileStream outputFile = new FileStream(@"c:\temp\output.txt", FileMode.Create); // encrypt the data using IO Streams - any type of input and output IO Stream can be used // as long as the source (input) stream can be read and the destination (output) stream // can be written to gpg.Encrypt(sourceFile, outputFile); // close the files sourceFile.Close(); outputFile.Close(); Decrypt File Example: // create a new GnuPG object GnuPG gpg = new GnuPG(); // create an IO.Stream object to the encrypted source of the data and open it FileStream encryptedFile = new FileStream(@"c:\temp\output.txt", FileMode.Open); // create an IO.Stream object to a where you want the decrypted data to go FileStream unencryptedFile = new FileStream(@"c:\temp\unencrypted.txt", FileMode.Create); // specify our secret passphrase (if we have one) gpg.Passphrase = "secret passphrase"; // decrypt the data using IO Streams - any type of input and output IO Stream can be used // as long as the source (input) stream can be read and the destination (output) stream // can be written to gpg.Decrypt(encryptedFile, unencryptedFile); // close the files encryptedFile.Close(); unencryptedFile.Close(); GnuPG interface class default constructor. The GPG executable location is obtained by information in the windows registry. Home path is set to the same as the GPG executable path. Output itemType defaults to Ascii Armour. GnuPG interface class constuctor. Output itemType defaults to Ascii Armour. The home directory where files to encrypt and decrypt are located. The GnuPG executable binary directory. GnuPG interface class constuctor. The home directory where files to encrypt and decrypt are located. The GPG executable location is obtained by information in the windows registry. Output itemType defaults to Ascii Armour. Encrypt OpenPGP data using IO Streams. Input stream data containing the data to encrypt. Output stream which will contain encrypted data. You must add the recipient's public key to your GnuPG key ring before calling this method. Please see the GnuPG documentation for more information. Decrypt OpenPGP data using IO Streams. Input stream containing encrypted data. Output stream which will contain decrypted data. Sign input stream data with default user key. Input stream containing data to sign. Output stream containing signed data. Verify signed input stream data with default user key. Input stream containing signed data to verify. Retrieves a collection of secret keys from the GnuPG application. Collection of GnuPGKey objects. Retrieves a collection of all keys from the GnuPG application. Collection of GnuPGKey objects. Deletes a given key from the keyring. The key's fingerprint. Generates a new key pair and puts it in the keyring. Name for the key Email address for the key Comment for the key Expire date for the key Send a key to keyserver. The fingerprint of the key to upload The keyserver (usually pgp.mit.edu) Send a key to keyserver. The fingerprint of the key to upload Gets a public key by its fingerprint. The fingerprint to get. The public key, in PGP Armor format. Gets a public/secret keypair by its fingerprint. The fingerprint to extract. The public and secret keypair, in PGP Armor format. Import a key supplied in PGP Armor format. The key (or keypair) to import. Revoke a key permanently Fingerprint of the key Revocation reason code Revocation reason cleartext Sign a (public) key with a (secret) key. Fingerprint of the key to sign. Identifier of the key used to sign. Dispose method for the GnuPG inteface class. Dispose method for the GnuPG interface class. Destructor method for the GnuPG interface class. Cancels any asychronous operation that is currently active. Starts asynchronous execution to encrypt OpenPGP data using IO Streams. Input stream data containing the data to encrypt. Output stream which will contain encrypted data. You must add the recipient's public key to your GnuPG key ring before calling this method. Please see the GnuPG documentation for more information. Starts asynchronous execution to decrypt OpenPGP data using IO Streams. Input stream containing encrypted data. Output stream which will contain decrypted data. Starts asynchronous execution to Sign OpenPGP data using IO Streams. Input stream containing data to sign. Output stream which will contain Signed data. Get or set the timeout value for the GnuPG operations in milliseconds. The default timeout is 10000 milliseconds (10 seconds). Recipient name of the encrypted data. Secret passphrase text value. The itemType of output that GPG should generate. Path to your home directory. Path to the location of the GPG.EXE binary executable. Gets a value indicating whether an asynchronous operation is running. Returns true if an asynchronous operation is running; otherwise, false. Gets a value indicating whether an asynchronous operation is cancelled. Returns true if an asynchronous operation is cancelled; otherwise, false. Event handler for EncryptAsync method completed. Event handler for DecryptAsync completed. Event handler for SignAsync completed. GnuPG actions. Encrypt data. Decrypt data. Sign data. Verify signed data. Reasons for revoking a key. No reason specified Key has been compromised. A new key has been issued to replace this one. The user has stopped using keys. Class structure that proves a read-only view of the GnuPG keys. GnuPGKey constructor. Raw output stream text data containing key information. Deletes this key. Key text information. Key expiration date and time. Key user identification. Key user name. Sub-key information. Sub-key expiration data and time. Raw output key text generated by GPG.EXE. This exception is thrown when a general, unexpected error condition occurs when running the GPG.EXE program. Constructor. Constructor. Exception message text. Constructor. Exception message text. The inner exception object. Constructor. Serialization information. Stream context information. This exception is thrown when a bad passphrase is given resulting in an error condition when running the GPG.EXE program. Constructor. Constructor. Exception message text. Constructor. Exception message text. The inner exception object. Constructor. Serialization information. Stream context information.