Encrypt

    Notes

    • specifies the plain column, CIPHER specifies the cipher column
    • encryptAlgorithmType specifies the encryption algorithm type, please refer to
    • Duplicate tableName will not be created
    • queryWithCipherColumn support uppercase or lowercase true or false

    Example

    1. COLUMNS(
    2. (NAME=order_id, CIPHER =order_cipher, ENCRYPT_ALGORITHM(TYPE(NAME='MD5')))
    3. ), QUERY_WITH_CIPHER_COLUMN=true),
    4. t_encrypt_2 (
    5. COLUMNS(
    6. (NAME=user_id,PLAIN=user_plain,CIPHER=user_cipher, ENCRYPT_ALGORITHM(TYPE(NAME='AES',PROPERTIES('aes-key-value'='123456abc')))),
    7. (NAME=order_id, CIPHER=order_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='MD5')))
    8. ALTER ENCRYPT RULE t_encrypt (
    9. COLUMNS(
    10. (NAME=user_id,PLAIN=user_plain,CIPHER=user_cipher,ASSISTED_QUERY_COLUMN=user_assisted,LIKE_QUERY_COLUMN=user_like,ENCRYPT_ALGORITHM(TYPE(NAME='AES',PROPERTIES('aes-key-value'='123456'))),ASSISTED_QUERY_ALGORITHM(TYPE(NAME='MD5')), LIKE_QUERY_ALGORITHM(TYPE(NAME='CHAR_DIGEST_LIKE'))),
    11. (NAME=order_id,CIPHER=order_cipher,ENCRYPT_ALGORITHM(TYPE(NAME='MD5')))
    12. ), QUERY_WITH_CIPHER_COLUMN=TRUE);
    13. DROP ENCRYPT RULE t_encrypt,t_encrypt_2;