cambyzju opened a new pull request, #40004:
URL: https://github.com/apache/doris/pull/40004

   support GCM mode for aes encrypt and decrypt, like spark, clickhouse, 
bigquery, snowflake and so on.
   
   Usage:
   ```
   > SELECT TO_BASE64(AES_ENCRYPT_V2('Spark SQL', '1234567890abcdef', 
'123456789012', 'aes_128_gcm', 'Some AAD'));
   
+---------------------------------------------------------------------------------------+
   | to_base64(aes_encrypt('Spark SQL', '***', '123456789012', 'aes_128_gcm', 
'Some AAD')) |
   
+---------------------------------------------------------------------------------------+
   | MTIzNDU2Nzg5MDEyMdXvR41sJqwZ6hnTU8FRTTtXbL8yeChIZA==                       
           |
   
+---------------------------------------------------------------------------------------+
   
   > SELECT 
AES_DECRYPT_V2(FROM_BASE64('MTIzNDU2Nzg5MDEyMdXvR41sJqwZ6hnTU8FRTTtXbL8yeChIZA=='),
 '1234567890abcdef', '', 'aes_128_gcm', 'Some AAD');
   
+------------------------------------------------------------------------------------------------------------------------+
   | 
aes_decrypt(from_base64('MTIzNDU2Nzg5MDEyMdXvR41sJqwZ6hnTU8FRTTtXbL8yeChIZA=='),
 '***', '', 'aes_128_gcm', 'Some AAD') |
   
+------------------------------------------------------------------------------------------------------------------------+
   | Spark SQL                                                                  
                                            |
   
+------------------------------------------------------------------------------------------------------------------------+
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to