AdsEnableEncryption

Advantage Client Engine

Enables record-based Advantage encryption and decryption

Syntax

UNSIGNED32

AdsEnableEncryption (ADSHANDLE hTable,

UNSIGNED8 *pucPassword);

Parameters

hTable (I)

Handle of a table or cursor.

pucPassword (I)

Case-sensitive text password. This is expected to be a null terminated string.

Remarks

This function enables encryption and decryption of individual records in the specified table. After a successful call to AdsEnableEncryption, any record that is updated will also be encrypted. Also, any record read that was previously encrypted will be viewed in its unencrypted form. If the current record in a table needs to be encrypted, but not updated, use AdsEncryptRecord. If all records in a table need to be encrypted, use AdsEncryptTable. To write a previously encrypted record in its decrypted form, see AdsDecryptRecord

Only one password can be used to encrypt records in a table. When encryption is enabled for the first time on a table, the table header is updated with the encryption information. Subsequent requests to enable encryption on the table will only succeed if the correct password is supplied. To remove encryption information from the table header, see AdsDecryptTable.

If AdsEnableEncryption fails for any reason, any encrypted records will be treated as read-only. If the entire table is encrypted, the entire table will be treated as read-only.

Note AdsEnableEncryption is only applicable with free tables. The encryption process is done automatically with database tables. ALTER permissions on the table are required to encrypt or decrypt database tables. See Advantage Data Dictionary for more information.

 

Note The password is case sensitive, so using "secret" will encrypt data differently than "SECRET".

Example

Click Here

See Also

AdsEncryptTable

AdsDisableEncryption

AdsDecryptTable

AdsIsEncryptionEnabled

AdsIsRecordEncrypted

AdsEncryptRecord

AdsDecryptRecord