SET ENCRYPTION

From Lianjapedia
Revision as of 05:56, 18 November 2015 by Yvonne.milne (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Purpose

Specify the default encryption key to be used when an encrypted table is accessed

Syntax

SET ENCRYPTION TO [<expC>]

SET ENCRYPTION ON | OFF | (<expL>)

See Also

APPEND FROM, COPY, COPY FILE, COPY STRUCTURE, CRC32(), DECRYPT, DES3_DECRYPT(), DES3_ENCRYPT(), DIR, ENCRYPT, MD5(), MD5FILE(), SHA1(), SHA1FILE(), USE

Description

If a database table is encrypted, the correct three-part encryption key must be specified before the table’s data or structure can be accessed. The SET ENCRYPTION TO set command can be used to specify a default encryption key to be used whenever an encrypted table is accessed without the key being specified. The <expC> is the three part comma-separated key.

If the command to access the table includes the key, either by appending it to the table filename specification or using an explicit clause, this will take precedence over the key defined by SET ENCRYPTION TO.

Issuing SET ENCRYPTION TO without the <expC> causes any previous setting to be cleared. The key must then be specified for each individual encrypted table.

The default key defined by SET ENCRYPTION TO <expC> is only active when SET ENCRYPTION is ON. SET ENCRYPTION OFF can be used to temporarily disable the default key. The SET ENCRYPTION ON | OFF setting does not change the default key itself. SET ENCRYPTION is ON by default.

Example

encrypt table1 key "key_1,key_2,key_3"
encrypt table2 key "key_2,key_3,key_4"
set encryption to "key_1,key_2,key_3"
use table1
use table2<key_2,key_3,key_4>
set encryption to
use table1 encryption "key_1,key_2,key_3"
use table2<key_2,key_3,key_4>