Skip to content

Commit

Permalink
use the same encrypt type in tsfile
Browse files Browse the repository at this point in the history
  • Loading branch information
zhujt20 committed Dec 11, 2024
1 parent e11f888 commit 8cdf4e5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,6 @@ public void setEncryptKey(String encryptKey) {
}

public void setEncryptKeyFromPath(String encryptKeyPath) {
if (!encryptFlag) {
return;
}
this.encryptKey = EncryptUtils.getEncryptKeyFromPath(encryptKeyPath);
EncryptUtils.encryptParam = EncryptUtils.getEncryptParameter();
EncryptUtils.normalKeyStr = EncryptUtils.getNormalKeyStr();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public static TsFileMetadata deserializeFrom(ByteBuffer buffer, DeserializeConfi
}
IDecryptor decryptor =
IDecryptor.getDecryptor(
TSFileDescriptor.getInstance().getConfig().getEncryptType(),
propertiesMap.get("encryptType"),
TSFileDescriptor.getInstance().getConfig().getEncryptKey().getBytes());
String str = propertiesMap.get("encryptKey");
fileMetaData.dataEncryptKey = decryptor.decrypt(EncryptUtils.getSecondKeyFromStr(str));
Expand Down

0 comments on commit 8cdf4e5

Please sign in to comment.