WebSphere Liberty 8.5.5.9 (二)

WebSphere Liberty 8.5.5.9 (二)

encode and decode

Pre WebSphere Liberty 8.5.5.9

xor and AES

提取 D:\wlp-webProfile7-java8-8.5.5.9\wlp\lib 下必要加解密包

com.ibm.ws.crypto.certificateutil_1.0.12.jar
com.ibm.ws.crypto.passwordutil_1.0.12.jar
com.ibm.ws.kernel.service.location_1.1.12.jar
com.ibm.ws.kernel.service_1.3.12.jar
com.ibm.ws.logging_1.0.12.jar

解密 {xor}CDo9Hgw=

String plainText = "WebAS";

System.out.println("1 -- " + PasswordUtil.passwordEncode(plainText));
System.out.println("2 -- " + PasswordUtil.passwordDecode("{xor}CDo9Hgw="));

String aesEncodedVal = PasswordUtil.passwordEncode(plainText, "aes");
System.out.println("3 -- " + aesEncodedVal);
System.out.println("4 -- " + PasswordUtil.passwordDecode(aesEncodedVal));

结果输出验证
WebSphere Liberty 8.5.5.9 (二)_第1张图片

你可能感兴趣的:(java,websphere)