CREATE ENCRYPT RULE encryptRuleDefinition [, encryptRuleDefinition] ...
ALTER ENCRYPT RULE encryptRuleDefinition [, encryptRuleDefinition] ...
DROP ENCRYPT RULE tableName [, tableName] ...
encryptRuleDefinition:
tableName(COLUMNS(columnDefinition [, columnDefinition] ...), QUERY_WITH_CIPHER_COLUMN=queryWithCipherColumn)
columnDefinition:
(NAME=columnName [, PLAIN=plainColumnName] , CIPHER=cipherColumnName, encryptAlgorithm)
encryptAlgorithm:
TYPE(NAME=encryptAlgorithmType [, PROPERTIES([algorithmProperties] )] )
algorithmProperties:
algorithmProperty [, algorithmProperty] ...
algorithmProperty:
key=value
createEncryptKeyManager
: CREATE ENCRYPT KEY MANAGER keyManagerName keyManagerDefinition
;
alterEncryptKeyManager
: ALTER ENCRYPT KEY MANAGER keyManagerName keyManagerDefinition
;
dropEncryptKeyManager
: DROP ENCRYPT KEY MANAGER ifExists? keyManagerName
;
keyManagerDefinition:
(TYPE(NAME=keyManagerName, PROPERTIES([keyManagerProperties]))
);)
keyManagerProperties:
keyManagerProperty [, keyManagerProperty] ...
keyManagerProperty:
key=value
CREATE ENCRYPT RULE t_encrypt (
COLUMNS(
(NAME=user_id,PLAIN=user_plain,CIPHER=user_cipher,TYPE(NAME='AES',PROPERTIES('aes-key-value'='123456abc'))),
(NAME=order_id, CIPHER =order_cipher,TYPE(NAME='MD5'))
), QUERY_WITH_CIPHER_COLUMN=true),
t_encrypt_2 (
COLUMNS(
(NAME=user_id,PLAIN=user_plain,CIPHER=user_cipher,TYPE(NAME='AES',PROPERTIES('aes-key-value'='123456abc'))),
(NAME=order_id, CIPHER=order_cipher,TYPE(NAME='MD5'))
), QUERY_WITH_CIPHER_COLUMN=FALSE);
ALTER ENCRYPT RULE t_encrypt (
COLUMNS(
(NAME=user_id,PLAIN=user_plain,CIPHER=user_cipher,TYPE(NAME='AES',PROPERTIES('aes-key-value'='123456abc'))),
(NAME=order_id,CIPHER=order_cipher,TYPE(NAME='MD5'))
), QUERY_WITH_CIPHER_COLUMN=TRUE);
DROP ENCRYPT RULE t_encrypt,t_encrypt_2;