mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 12:07:42 +00:00
Co-authored-by: lxwcodemonkey
This commit is contained in:
@@ -46,7 +46,7 @@ public class Database extends RecordInfo {
|
||||
private List<String> viewers = Lists.newArrayList();
|
||||
|
||||
public String passwordDecrypt() {
|
||||
return AESEncryptionUtil.aesDecryptCBC(password);
|
||||
return AESEncryptionUtil.aesDecryptECB(password);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -65,14 +65,13 @@ public class SqlUtils {
|
||||
}
|
||||
|
||||
public SqlUtils init(Database database) {
|
||||
//todo Password decryption
|
||||
return SqlUtilsBuilder
|
||||
.getBuilder()
|
||||
.withName(database.getId() + AT_SYMBOL + database.getName())
|
||||
.withType(database.getType())
|
||||
.withJdbcUrl(database.getUrl())
|
||||
.withUsername(database.getUsername())
|
||||
.withPassword(database.passwordDecrypt())
|
||||
.withPassword(database.getPassword())
|
||||
.withJdbcDataSource(this.jdbcDataSource)
|
||||
.withResultLimit(this.resultLimit)
|
||||
.withIsQueryLogEnable(this.isQueryLogEnable)
|
||||
|
||||
Reference in New Issue
Block a user