Encrypt Action

Description

Encrypts one or more files using the specified encryption type and algorithm. Supports both symmetric (passphrase) and asymmetric (public/private key) modes. Standard support for a broad range of algorithms: Rijndael, DES, RC2, and TripleDES.

If PGP is installed, the actions can optionally use the PGP engine for both passphrase and public/private key encryption and support for the following algorithms: IDEA, 3DES, CAST5, Blowfish, AES128, AES192, AES256, and Twofish256.

Fully supports Automated Workflow file masking and filtering.

Automated Workflow Designer also provides an option to generate a new public/private key pair to be used for the encryption.

Declaration

<AMENCRYPT ENCRYPTTYPE="Text[Option]" INPUTFILE="Text" OUTPUTFILE="Text" SUBFOLDERS="yes/no" KEEPFOLDERSTRUCT="yes/no" OVERWRITE="yes/no" ISNEWER="yes/no" ONLYIFEXIST="yes/no" OVERWRITEREADONLY="yes/no" OVERWRITEHIDDEN="yes/no" ARCHIVETURNOFF="yes/no" EXCLUDE="Text" RE="yes/no"  ISNEWERTHAN="Date" ISOLDERTHAN="Date" ATTRFILTER="Text" ENCRYPTALGO="Text[Option]" PASSWORD="Text" PUBLICKEY="Text"

Example

<AMENCRYPT ENCRYPTTYPE="PASSPHRASE" INPUTFILE="C:\SourceFolder\*.DOC" OUTPUTFILE="C:\DestinationFolder\encr*.doc" SUBFOLDERS="YES" KEEPFOLDERSTRUCT="YES" OVERWRITE="YES" ISNEWER="YES" ONLYIFEXIST="YES" OVERWRITEREADONLY="YES" OVERWRITEHIDDEN="YES" ARCHIVETURNOFF="YES" EXCLUDE="*.pri" ISNEWERTHAN="%DateSerial(2007,02,01)+TimeSerial(12,15,18)%" ISOLDERTHAN="%DateSerial(2007,02,14)+TimeSerial(12,15,18)%" ATTRFILTER="+r-a-s-h+c-e" ENCRYPTALGO="Rijndael" PASSWORD="g9tc745yuig3j9t" />

General Tab Parameters

Source: Specifies the path and file names for the files to encrypt. Wildcard characters asterisk (*) and question mark (?) can be used to encrypt files matching a certain mask.

Text, Required
MARKUP:
a) INPUTFILE="c:\sourcefoldername\file.txt"
b) INPUTFILE="c:\sourcefoldername\*.txt"

Destination: Specifies the destination folder and (optional) filename for the files being encrypted. Folders that do not exist will be automatically created at runtime.

Text, Required
MARKUP:
a) OUTPUTFILE="c:\destinationfoldername\file.txt"
b) OUTPUTFILE="c:\destinationfoldername\
c) DEST="c:\destfolder\newdestfolder\*.txt"

Type: Specifies the type of encryption to use. The Available options are:

  • (Default): Passphrase. Require specified passphrase to decrypt.

  • KEY: Public/Private Key. Encrypt with public key. Require associated private key to decrypt.

  • PGPPASSPHRASE: PGP Passphrase. Require specified PGP passphrase to decrypt.

  • PGPKEY: PGP Public/Private Key. Encrypt with PGP public key. Require associated PGP private key to open.

Text, Optional - Default "passphrase"
MARKUP: ENCRYPTTYPE="KEY"

Algorithm: Specifies the algorithm to use. Active only with Passphrase or PGP Passphrase selections.

Options for Passphrase are:

    • Rijndael

    • DES

    • RC2

    • TripleDES

Options for PGP Passphrase are:

    • IDEA

    • 3DES

    • CAST5

    • Blowfish

    • AES128

    • AES192

    • AES256

    • Twofish256

Text, Optional - Default "Rijndael"
MARKUP: ENCRYPTALGO="DES"

Passphrase: Specifies the passphrase required to decrypt the file.

Text, Required if encryption Type is Passphrase
MARKUP: PASSWORD="g9tc745yuig3j9t"

Key File: Specifies the path and file name of the public key file to be used to encrypt the file.

Text, Required if encryption Type is Public/Private Key
MARKUP: PUBLICKEY="C:\Foldername\PublicKey.pub"

Options Tab

Include Subfolders: When set to YES (selected), specifies that, if present, subfolders should be searched for files matching the mask specified in the "Source" [INPUTFILE] parameter

Yes/No, Optional default - NO
MARKUP: SUBFOLDERS="YES"

Preserve Folder Structure: Valid only if the "Include subfolder" [SUBFOLDERS] parameter is YES. When set to YES (selected), specifies that subfolders found in the source folder should be created in the destination folder, and source files should be encrypted into their respective folders rather than directly into the root of the target folder specified in "Destination" [OUTPUTFILE] parameter. If the "Include subfolders" [SUBFOLDERS] parameter is set to NO this parameter is ignored.

Yes/No, Optional default - YES
MARKUP: KEEPFOLDERSTRUCT="NO"

Overwrite if Exists: When set to YES (selected), specifies that, if destination files already exist, they should be overwritten.

Yes/No, Optional default - NO
MARKUP: OVERWRITE="YES"

Only if Newer: Valid only if the "Overwrite if exists" [OVERWRITE] parameter is YES. When set to YES (selected), specifies that only files that are newer than those in the destination folders will overwrite existing files.

Yes/No, Optional default - NO
MARKUP: ISNEWERTHAN="YES"

Only if Exists in Destination: Valid only if the "Overwrite if exists" [OVERWRITE] parameter is YES. When set to YES (selected), specifies that only files that already exist in the destination will be encrypted from the source. All other files, regardless of whether they match the mask or other parameter settings will be bypassed.

Yes/No, Optional default - NO
MARKUP: ONLYIFEXIST="YES"

Overwrite Read-Only Files: Valid only if the "Overwrite if exists" [OVERWRITE]  parameter is YES. When set to YES (selected), specifies that already existing files should be overwritten even if the file in the destination is marked with the "read-only" attribute. By default, read only files are not overwritten.

Yes/No, Optional default - NO
MARKUP: OVERWRITEREADONLY="YES"

Overwrite Hidden Files: Valid only if the "Overwrite if exists" [OVERWRITE]  parameter is YES. When set to YES (selected), specifies that already existing files should be overwritten even if the file in the destination is marked with the "hidden" attribute. By default, hidden files are bypassed.

Yes/No, Optional default - NO
MARKUP: OVERWRITEHIDDEN="YES"

Turn Archive Attribute Off: When set to YES (selected), specifies that the "archive" attribute of the source files should be switched OFF. The Windows "archive" attribute is generally used to track whether a file has been backed-up by turning the source file's archive attribute off—this indicates to many backup programs that the file has already been backed-up.

Yes/No, Optional default - NO
MARKUP: ARCHIVETURNOFF="YES"

Exclude Mask: Causes the action to not encrypt files matching the masks specified. Filenames or wildcard masks may be used. Multiple entries may be specified by separating them with a pipe symbol (|), for example, *.txt|*.bak

Text, Optional default - (blank)
MARKUP: EXCLUDE="*.txt"

Regular Expression: If set to YES, specifies that a regular expression is used in the Exclude Mask field.

Yes/No, Optional default - NO
MARKUP: RE="YES"

Only if Newer Than: Causes the action to only encrypt files if the source is newer than the date/time specified. If parameter is left blank or not included, the date of the files will be ignored (excluding "Only if newer" [ISNEWER] parameter).

date, Optional default - (none)

MARKUP: ISNEWERTHAN="%DateSerial(2007,10,12) + TimeSerial(00,00,00)%"

Only if Older Than: Causes the action to only encrypt files if the source is older than the date/time specified. If parameter is left blank or not included, the date of the files will be ignored (excluding "Only if newer" [ISNEWER] parameter)

date, Optional default - (none)
MARKUP: ISOLDERTHAN="%DateSerial(2007,10,12) + TimeSerial(00,00,00)%"

Attributes Tab

Attributes: This group of settings causes the action to filter which files are encrypted based on the attribute settings of the source files. In visual mode, a group of controls is provided to assist in the selection of this parameter. In markup mode, a single text item must be specified that contains the attributes of the files you wish to encrypt.

Available Options:

  • R—Read only: Specifying "+R" causes files with this attribute turned on to be included; "-R" causes files with this attribute turned off to be included; not specifying the letter (default) causes this attribute to be ignored.

  • A—Archive: Specifying "+A" causes files with this attribute turned on to be included; "-A" causes files with this attribute turned off to be included; not specifying the letter (default) causes this attribute to be ignored.

  • S—System: Specifying "+S" causes files with this attribute turned on to be included; "-S" causes files with this attribute turned off to be included; not specifying the letter (default) causes this attribute to be ignored.

  • H—Hidden: Specifying "+H" causes files with this attribute turned on to be included; "-H" causes files with this attribute turned off to be included; not specifying the letter (default) causes this attribute to be ignored.

  • C—Compression: Specifying "+C" causes files with this attribute turned on to be included; "-C" causes files with this attribute turned off to be included; not specifying the letter (default) causes this attribute to be ignored.

  • E—Encrypted: Specifying "+E" causes files with this attribute turned on to be included; "-E" causes files with this attribute turned off to be included; not specifying the letter (default) causes this attribute to be ignored.

Text, Optional (blank)
MARKUP:
ATTRFILTER="+R+A-S-H" (encrypt read-only and archive files, not system or hidden)
ATTRFILTER="-S" (do not encrypt "system" files)