ClickHouse/tests/queries/0_stateless/01683_codec_encrypted.sql
PHO 6425dd001a
Add a codec AES_128_GCM_SIV for encrypting columns on disk (#19896)
* Add a codec Encrypted() for encrypting columns on disk

While this is implemented as a compression codec, it does not actually compress data. It instead encrypts data on disk. The key is obtained by executing a user-specified command at the server startup, or if it's not specified the codec refuses to process any data. For now the only supported cipher is 'AES-128-GCM-SIV'.
2021-07-30 12:12:33 +03:00

8 lines
271 B
SQL

DROP TABLE IF EXISTS encryption_test;
CREATE TABLE encryption_test (i Int, s String Codec(Encrypted('AES-128-GCM-SIV'))) ENGINE = MergeTree ORDER BY i;
INSERT INTO encryption_test VALUES (1, 'Some plaintext');
SELECT * FROM encryption_test;
DROP TABLE encryption_test;