标签:public 工具 color oid apache print auth rap import
import org.apache.shiro.crypto.hash.Md5Hash; /** * 加密工具 * @author Administrator * */ public class CryptographyUtil { /** * Md5加密 * @param str * @param salt * @return */ public static String md5(String str,String salt){ return new Md5Hash(str,salt).toString(); } public static void main(String[] args) { String password="123456"; System.out.println("Md5加密:"+CryptographyUtil.md5(password, "java1234")); } }
标签:public 工具 color oid apache print auth rap import
原文地址:https://www.cnblogs.com/duanwandao/p/9534624.html