jt2594838 commented on code in PR #519: URL: https://github.com/apache/tsfile/pull/519#discussion_r2156403132
########## java/tsfile/src/main/java/org/apache/tsfile/common/conf/TSFileConfig.java: ########## @@ -156,11 +156,17 @@ public class TSFileConfig implements Serializable { private CompressionType compressor = CompressionType.LZ4; /** encryptKey, this should be 16 bytes String. */ - private byte[] encryptKey = "abcdefghijklmnop".getBytes(TSFileConfig.STRING_CHARSET); + private byte[] encryptKey = EncryptUtils.generateSalt(); Review Comment: This is confusing. Is it necessary to initialize it here? ########## java/tsfile/src/main/java/org/apache/tsfile/common/conf/TSFileConfig.java: ########## @@ -156,11 +156,17 @@ public class TSFileConfig implements Serializable { private CompressionType compressor = CompressionType.LZ4; /** encryptKey, this should be 16 bytes String. */ - private byte[] encryptKey = "abcdefghijklmnop".getBytes(TSFileConfig.STRING_CHARSET); + private byte[] encryptKey = EncryptUtils.generateSalt(); /** Data encryption method, default encryptType is "UNENCRYPTED". */ private String encryptType = "UNENCRYPTED"; + /** Salt for encrypt, this should be 16 bytes String. */ + private byte[] encryptSalt = EncryptUtils.generateSalt(); + + /** Whether to save encrypt key in IoTDB, default value is false. */ + private boolean saveEncryptKey = false; Review Comment: This should be put into IoTDB. -- 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: notifications-unsubscr...@tsfile.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org