Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public class TSFileConfig implements Serializable {
/** encryptKey, this should be 16 bytes String. */
private String encryptKey = "abcdefghijklmnop";

/** default encryptType is "UNENCRYPTED", TsFile supports UNENCRYPTED or AES128. */
/** default encryptType is "UNENCRYPTED". */
private String encryptType = "UNENCRYPTED";

/** Line count threshold for checking page memory occupied size. */
Expand Down
38 changes: 0 additions & 38 deletions java/tsfile/src/main/java/org/apache/tsfile/encrypt/AES128.java

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.apache.tsfile.common.conf.TSFileConfig;
import org.apache.tsfile.common.conf.TSFileDescriptor;
import org.apache.tsfile.exception.encrypt.EncryptException;
import org.apache.tsfile.exception.encrypt.EncryptKeyLengthNotMatchException;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -79,9 +78,6 @@ public static String getEncryptKeyFromPath(String path) {
sb.append("\n").append(line);
}
}
if (sb.toString().length() != 16) {
throw new EncryptKeyLengthNotMatchException(16, sb.toString().length());
}
return sb.toString();
} catch (IOException e) {
throw new EncryptException("Read main encrypt key error", e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ static IDecryptor getDecryptor(String type, byte[] key) {
IEncrypt.encryptMap.put(className, constructor);
return ((IEncrypt) constructor.newInstance(key)).getDecryptor();
} catch (ClassNotFoundException e) {
throw new EncryptException("Get decryptor class failed: " + type, e);
throw new EncryptException("Get decryptor class failed, class not found: " + type, e);
} catch (NoSuchMethodException e) {
throw new EncryptException("Get constructor for decryptor failed: " + type, e);
} catch (InvocationTargetException | InstantiationException | IllegalAccessException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ static IEncryptor getEncryptor(String type, byte[] key) {
IEncrypt.encryptMap.put(className, constructor);
return ((IEncrypt) constructor.newInstance(key)).getEncryptor();
} catch (ClassNotFoundException e) {
throw new EncryptException("Get encryptor class failed: " + type, e);
throw new EncryptException("Get encryptor class failed, class not found: " + type, e);
} catch (NoSuchMethodException e) {
throw new EncryptException("Get constructor for encryptor failed: " + type, e);
} catch (InvocationTargetException | InstantiationException | IllegalAccessException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ public enum EncryptionType {
SM4128("SM4128", (byte) 1),

/** AES128. */
AES128("AES128", (byte) 2);
AES128("AES128", (byte) 2),

/** NewWay. */
NewWay("NewWay", (byte) 3);

private final String extensionName;
private final byte index;
Expand All @@ -53,7 +56,7 @@ public static EncryptionType deserialize(byte encryptor) {
case 2:
return EncryptionType.AES128;
default:
throw new IllegalArgumentException("Invalid input: " + encryptor);
return EncryptionType.NewWay;
}
}

Expand Down

This file was deleted.

Loading
Loading