赞
踩
1.打开命令行,进入到druid 的目录,如C:\Users\ppp\.m2\repository\com\alibaba\druid\1.1.20>
2.输入:java -cp druid-1.1.20.jar com.alibaba.druid.filter.config.ConfigTools 【password】
(若密码有特殊字符,需要在特殊字符前加^, 如密码是 78&^8839, 输入:78^&^^8839)运行,得到如下输出
privateKey:MIIBUwIBADANBgkqhkiG9w0BAQEFAASCAT0wggE5AgEAAkEAxEyd6hZsN3GXDLzbI87Yz4AfXdtVhyA9RqwDr8ehfKHmL+Ih61NkQb/toOt91uzVaHcWOuO/1dy/kSMfPetvgwIDAQABAkB5COjBgmvdT8ucDgJstMiYQN6WR3wX4j
gGEGABjWyz5CTLsmIelQhV+a4YeO2UtBwuiRIadUourt1jY6cnLzmJAiEA/tIyPhb2teSirMn5gOE1laTYLkW8vFtVyv677Osttt8CIQDFNRvcwNk9CgpXmeLg1xFmZ6gzv7ZZq2Pz6vGkoXKP3QIgPW7/neh7Yi7U6UNoW6HwATvUwpMdhWufq2j
udZfdVZECIF+QItZQpXTMvsJAkg6+aXIkXP/msOi3AxKaEUrj6W4JAiB2reIeeO5uSYYym9p8/bu/bdWq3aWgxHcRr9/92GUigQ==
publicKey:MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAMRMneoWbDdxlwy82yPO2M+AH13bVYcgPUasA6/HoXyh5i/iIetTZEG/7aDrfdbs1Wh3Fjrjv9Xcv5EjHz3rb4MCAwEAAQ==
password:l7O+t9E2G+z2XJGg6LkixMtkCLrudw4XsfQFpKkAsIQ1CrHDcfbQjn/VIPuiUkIzJYZj6npiknVSoV2/UwJsdw==
取publicKey及password即可
得到加密后的密码,和publicKey,利用druid包里的ConfigTools的decrypt方法解密
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。