java证书的加密与解密代码
}
public static String decrypt(String content) throws Exception {
byte[] bytes = CryptUtils.hex2byte(content);
bytes = dcip.doFinal(bytes);
return new String(bytes, "ascii");
}
//test
public static void main(String[] args) throws Exception {
String password = "gly";
String en = encrypt(password);
System.out.println(en);
System.out.println(decrypt(en));
}
}
【java证书的加密与解密代码】相关文章: