mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 05:22:13 +08:00
fix: 对接 SQLBot 使用 AES 加密对短 IV 补充逻辑错误
This commit is contained in:
committed by
fit2cloud-chenyw
parent
8edd3fb0fd
commit
e01890b792
@@ -101,7 +101,7 @@ public class DatasetSQLBotManage {
|
||||
iv = iv.substring(0, 16);
|
||||
}
|
||||
if (len < 16) {
|
||||
iv = String.format("%-" + (16 - len) + "s", iv).replace(' ', '0');
|
||||
iv = String.format("%-16s", iv).replace(' ', '0');
|
||||
}
|
||||
return AesUtils.aesEncrypt(text, aesKey, iv);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user