ENCRYPT.FILE

ENCRYPT.FILE

Top  Previous  Next

 

The ENCRYPT.FILE command sets the data encryption key for specific fields or the entire record.

 

 

Format

 

ENCRYPT.FILE filename field, keyname ...

ENCRYPT.FILE filename keyname

ENCRYPT ALL keyname {NO.QUERY}

 

where

 

filenameis the name of the file to which encryption is to be applied.

 

fieldis the name or field number of the field to which encryption is to be applied.

 

keynameis the name of the encryption key to be used. This is case insensitive.

 

 

The first form of the ENCRYPT.FILE command sets the encryption key for one or more fields within a file that uses field level encryption. Encryption cannot be applied to a field that is used for an alternate key index.

 

The second form of the ENCRYPT.FILE command sets the encryption key for record level encryption. Alternate key indices can be defined in files that use record level encryption but, because the index itself is not encrypted by default, the indexed fields have reduced security.

 

The third form of the ENCRYPT.FILE command encrypts all hashed files defined by F-type VOC entries that are not already using encryption. Standard system files such as the VOC are omitted. The default behaviour is to build and display a list of files that are eligible for encryption. The list can then be modified to remove unwanted files. The NO.QUERY keyword omits this file selection step but does not disable other confirmation prompts. The displayed list shows an alphabetically sorted numbered list of files that can be scrolled from page to page using the cursor up/down or page up/down keys. Files selected for encryption are marked with an asterisk. Entry of a line number (e.g. “12”) or a range of line numbers (e.g. “12-18”) toggles the selection state of the related files. Once the list is correct, entering "A" applies the encryption. Use of "Q" or "QUIT" will abort the action.

 

 

If the file contains data records when this command is used, the file is processed to apply the encryption. A system failure or other process abort during this update will leave the file in a partially encrypted state and hence render it unusable. Always back up a file before using this command if the file contains data.

 

 

Examples

 

ENCRYPT.FILE CUSTOMERS CCARD,CARDNO

 

The above command encrypts the CCARD field of the CUSTOMERS file using the CARDNO encryption key.

 

 

ENCRYPT.FILE CUSTOMERS CKEY

 

The above command encrypts the CUSTOMERS file using the CKEY encryption key for record level encryption.

 

 

See also:

Data encryption, CHANGE.KEY.PASSWORD, CREATE.FILE, CREATE.KEY, CREATE.SECURE.KEY, DECRYPT.FILE, DELETE.KEY, DISABLE.KEY, DISABLE.KEY (QMBasic), ENABLE.KEY, ENABLE.KEY (QMBasic), GRANT.KEY, LIST.KEYS, RESET.MASTER.KEY, REVOKE.KEY, SET.ENCRYPTION.KEY.NAME, UNLOCK.KEY.VAULT