一、引入shiro依赖
<properties>
<shiro.ver>1.2.3</shiro.ver>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-core</artifactId>
<version>${shiro.ver}</version>
</dependency>
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-web</artifactId>
<version>${shiro.ver}</version>
</dependency>
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-spring</artifactId>
<version>${shiro.ver}</version>
</dependency>
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-aspectj</artifactId>
<version>${shiro.ver}</version>
</dependency>
</dependencies>
二、使用方法
Md5Hash md5Hash = new Md5Hash("111111");
Md5Hash md5Hash = new Md5Hash("111111","abcd");
Md5Hash md5Hash = new Md5Hash("111111","abcd",1024);
String str = md5Hash.toHex();
System.out.println(str);