Database password decryption:
Create a DesPassword class write the main method, the druid class inherits DruidPasswordCallback.
Reference ConfigTools.decrypt (publickey, password) method in the main method, the known public key and password filled in.
Print the results, done
import com.alibaba.druid.filter.config.ConfigTools; import com.alibaba.druid.util.DruidPasswordCallback; public class DesPassword extends DruidPasswordCallback { public static void main(String[] args) throws Exception{ String publickey = 填入公钥; String password = 填入密码; String pwd = ConfigTools.decrypt(publickey, password); System.out.println(pwd); } }
This switched: https://blog.csdn.net/sz_huangrui/article/details/84788089