druid工具类生成秘钥加解密
import com.alibaba.druid.filter.config.ConfigTools;
public class PasswordTest
{
public static void main(String[] args)
{
// String[] params = new String[] { "456" };
String[] params = new String[] { "123" };
try
{
String publicKey = "MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAMTZ1RbzR1b/LlGC4pJC7dApxdfafdfafdasf0/CnAxQk+PAXdFFFt196faoO9ubqqfSZ30OkHV9Voi+CKK4M7zzy4JEkZjd06kCAwEAAQ==";
String cipherText = "GC1AlW8h21/ERUhKHse6EjJIOj5ef991LvoCKwFwgoyexZuMh1P7X5t+rSsssadsaCdl1NgXPLCUatVd8H8CPNEpzNrCQ==";
// String decrypt = ConfigTools.decrypt(publicKey, cipherText);
// System.out.println(decrypt);
ConfigTools.main(params);
}
catch (Exception e)
{
e.printStackTrace();
}
}
}
更多推荐
所有评论(0)