druid获取不需要配置公钥私钥的密文,或者明文
import com.alibaba.druid.filter.config.ConfigTools;
/**
* Created with IntelliJ IDEA on 2019/3/21.
*
* @author somebody
*/
public class Test {
public static void main(String[] args) {
try {
String password = ConfigTools.encrypt("prodba");
String password2 = ConfigTools.decrypt("SYCS+D98Rkg8rL5p+hurxJUOEJGY3lD486XIFIlA3H7bv9q6x3btS0AFvK8pGyVq5xafG3ZFON1E3hVlomZNOA==");
System.out.println(password + "\n" + password2);
} catch (Exception e) {
e.printStackTrace();
}
}
}