IP*Works! Encrypt V9 - Online Help
IP*Works! Encrypt V9
Questions / Feedback?

Openpgp Configuration

The bean accepts one or more of the following configuration settings. Configuration settings are similar in functionality to properties, but they are rarely used. In order to avoid "polluting" the property namespace of the bean, access to these internal properties is provided through the Config method.

OpenPGP Configuration Settings

AllowEmptyInput:   Whether to allow empty files for input.

This setting controls whether the bean allows empty input when processing. When True, the bean will process 0 byte files specified by InputFile, or 0 byte messages specified by InputMessage. The default value is False.

AllowOldPacketType:   Whether to allow the older encrypted packet type.

By default the bean will only encrypt data using the newer and more secure integrity protected data packet type. Old implementations such as PGP 6.5.8 may require the older less secure data packet type.

When set to True the bean will read the features from the recipient key to determine if the older packet type is required. If the key does require the old packet type, then the older packet type will be used. If the key does not require the old packet type, then the new integrity protected packet type will still be used.

By default this value is False. This means under no conditions is the older less secure packet type used. The newer integrity protected packet type is always used.

Only enable this setting if you have a requirement to do so.

AutoSelectAlgorithms:   Whether to automatically select algorithms when encrypting or signing.

When set to True the bean will select the preferred algorithms specified by the key. The default value is False.

If True, when Encrypt is called the bean will read the preferred encryption algorithm and compression method from the key specified in RecipientKeys . If multiple keys are specified the preferred encryption algorithm and compression method from the last key is used. The EncryptingAlgorithm and CompressionMethod properties are ignored.

If True, when Sign is called the bean will read the preferred signing algorithm and compression method from the private key specified in Keys . If multiple keys are specified the preferred signing algorithm and compression method from the last key is used. The SigningAlgorithm and CompressionMethod properties are ignored.

AutoSelectCipherAlgorithm:   Whether to automatically select the cipher algorithm when encrypting.

This setting may be used to control whether the cipher algorithm is automatically selected. This is similar to AutoSelectAlgorithms but only applies to the cipher algorithm.

Setting AutoSelectAlgorithms resets this value to match the value in AutoSelectAlgorithms. Set this after setting AutoSelectAlgorithms to be sure the intended value is used.

AutoSelectMACAlgorithm:   Whether to automatically select the MAC algorithm when signing.

This setting may be used to control whether the MAC algorithm is automatically selected. This is similar to AutoSelectAlgorithms but only applies to the MAC algorithm.

Setting AutoSelectAlgorithms resets this value to match the value in AutoSelectAlgorithms. Set this after setting AutoSelectAlgorithms to be sure the intended value is used.

AutoSelectCompressionAlgorithm:   Whether to automatically select the compression algorithm.

This setting may be used to control whether the compression algorithm is automatically selected. This is similar to AutoSelectAlgorithms but only applies to the compression algorithm.

Setting AutoSelectAlgorithms resets this value to match the value in AutoSelectAlgorithms. Set this after setting AutoSelectAlgorithms to be sure the intended value is used.

CompressionLevel:   The Zip or Zlib compression level.

This setting specifies the level of compression to be used: possible values are 1 to 6. Higher values will cause the bean to compress better; lower values will cause the bean to compress faster. The default value is 4. Note: This setting is only applicable when CompressionMethod is set to "zlib" or "zip".

CloseInputStreamAfterProcess:   Determines whether or not the input stream is closed after processing.

Determines whether or not the input stream set by SetInputStream is closed after processing is complete. The default value is True.

CloseOutputStreamAfterProcess:   Determines whether or not the output stream is closed after processing.

Determines whether or not the output stream set by SetOutputStream is closed after processing is complete. The default value is True.

DetachedSignatureData:   The detached signature.

This setting is used to specify the detached signature before calling VerifySignature. The message data should be specified normally and this setting should be set to the detached signature data. Both hex-string and OpenPGP ASCII-armored message formats are allowed. Hex-encoded data should be provided as a string like so:

89011C04000102000605025100459B000A0910E2...
FileName:   The original name of the encrypted file.

When encrypting, this configuration setting can be used to specify the original name of the encrypted data. When specifying an InputFile to encrypt from, this is included automatically in the encrypted packet. After decrypting, this will contain the file name of the original encrypted file.

PGPZipDir:   The directory used when creating or extracting a PGP zip file.

A PGP zip file is a Tar archive that is encrypted. It is commonly used by utilities to protect multiple files in one OpenPGP message. The bean supports creating and extracting these types of files.

  • To create a PGP zip file set this value to a location on disk including a filemask and call Encrypt. For instance:
    OpenPGP1.Config("PGPZipDir=C:\MyFiles\*.txt");
    OpenPGP1.OutputFile = "C:\PGPZip.pgp";
    OpenPGP1.Encrypt();
    The created file returned in the OutputFile property is the PGP zip. If InputFile is specified it is used to temporarily hold the Tar archive while creating the PGP zip file. The temporary file is not automatically deleted. If InputFile is not specified the Tar archive is held in memory while creating the PGP zip file.
  • To extract a PGP zip file set this value to a location on disk and call Decrypt. For instance:
    OpenPGP1.Config("PGPZipDir=C:\MyFiles");
    OpenPGP1.InputFile = "C:\PGPZip.pgp";
    OpenPGP1.Decrypt();
    The extracted files will be present in the specified directory. If OutputFile is specified it is used to temporarily hold the Tar archive. The temporary file is not automatically deleted. If OutputFile is not specified the Tar archive is held in memory while extracting the PGP zip file. Note that if the OpenPGP message supplied is not a PGP zip file the decryption will occur as normal without error.

RequireValidSignature:   Specifies if an invalid signature is considered an error condition.

By default, if the signature is not valid the bean throws an exception. This setting may be set to False to disable this requirement. When False, the Status parameter of the VerificationStatus event should be checked to determine the result of the operation. The default value is True.

SplitHeaders:   Controls whether ASCII Armor headers are split or not.

By default, when headers are specified via MessageHeaders, the bean will split headers over a certain length onto multiple lines. This is done to avoid potential errors during transport of the message. If false, the headers will be on one line regardless of length. The default value is True.

SymmetricPassphrase:   The password used for symmetric encryption or decryption.

This setting specifies the passphrase when using symmetric encryption. If a value is provided, symmetric encryption/decryption will be attempted. In this case no keys are used for either encryption or decryption. Only Encrypt and Decrypt are valid operations when a value is set. Sign, SignAndEncrypt, VerifySignature, and DecryptAndVerifySignature are not valid operations when using this option.

AutoSelectDSASignatureHashAlgorithm:   Whether or not to select a suitable signature hash algorithm automatically.

When set to true the bean will automatically select an appropriate hash algorithm for DSA keys. DSA requires that the hash be 160 bits or larger. This means the MD5 hash algorithm is not a valid option. The default value is True.

VersionHeader:   The Version header value in the ASCII armored OpenPGP message.

This setting specifies the Version header value included in the ASCII armored OpenPGP message. This may be set before calling Encrypt, Sign, or SignAndEncrypt. The default value is "IPWorks! OpenPGP v9.0".

This setting will be populated after calling Decrypt, VerifySignature, or DecryptAndVerifySignature.

LogLevel:   Specifies the level of detail that is logged.

This setting controls the level of detail that is logged through the Status event. Possible values are:

0 (None)No events are logged.
1 (Info - default)Informational events are logged.
2 (Verbose)Detailed data is logged.
3 (Debug)Debug data is logged.

ProgressEventThreshold:   The amount of data in bytes to process before firing the progress event.

When encrypting or decrypting, the Progress event is fired as data is processed by the bean. When this setting is specified, the event will only fire after processing at least the specified number of bytes. The default value is 0.

ReadFromProgressEvent:   Whether to read input data from inside the progress event.

When set to True this setting allows input data to be specified from within the Progress event. The bean will repeatedly fire the Progress event to ask for data. Inside the event set InputMessage when the Operation parameter of the event is 1 (Read). When all data has been provided set the IsEOF parameter of the event to True. This allows input data to be chunked and provided piece by piece. The default value is False.

WriteToProgressEvent:   Whether to write output data so it is accessible from inside the progress event.

When set to True this setting allows output data to be obtained from within the Progress event. The bean will repeatedly fire the Progress event to provide output data. Inside the event check OutputMessage when the Operation parameter of the event is 2 (Write). The IsEOF parameter should be checked inside the event to determine when all output data has been provided. This allows output data to be chunked and obtained piece by piece. The default value is False.

UseFipsCompliantAlgorithms:   Restricts the usage to FIPS compliant algorithms only.

When enabled the bean will only support FIPS compliant algorithms. If a non-FIPS compliant algorithm is used an exception is thrown. The following algorithms are supported when this setting is True:

  • 3DES
  • AES128
  • AES192
  • AES256
  • RSA
  • DSA
  • SHA1
  • SHA256
  • SHA384
  • SHA512
  • SHA224
The default value is False.
RecursiveDecryptMode:   Whether the encrypted data should be decrypted recursively.

In some instances data will be encrypted multiple times. This configuration option determines how the bean will handle this situation. Options are:

0Automatic - If the PGP message contains the special header version "PGP Command Line" then recursive decryption will be attempted. (Default)
1Always attempt recursive decryption.
2Never attempt recursive decryption.

Base Configuration Settings

GUIAvailable:   Tells the bean whether or not a message loop is available for processing events.

In a GUI-based application, long-running blocking operations may cause the application to stop responding to input until the operation returns. The bean will attempt to discover whether or not the application has a message loop and, if one is discovered, it will process events in that message loop during any such blocking operation.

In some non-GUI applications an invalid message loop may be discovered that will result in errant behavior. In these cases, setting GuiAvailable to false will ensure that the bean does not attempt to process external events.

UseDaemonThreads:   Whether threads created by the bean are daemon threads.

If set to True, when the bean creates a thread the thread's Daemon property will be explicitly set to True. By default this setting is False and the bean will not set the Daemon property on the created thread.

 
 
Copyright (c) 2017 /n software inc. - All rights reserved.
Build 9.0.6240.0