You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
798 B
Java
25 lines
798 B
Java
2 years ago
|
package weaver.file;
|
||
|
|
||
|
import weaver.interfaces.encode.AES_IV;
|
||
|
|
||
|
public class test {
|
||
|
public static void main(String[] args) {
|
||
|
|
||
|
String loginid = "32715F3A426667E9FF2BA698555B94C9";
|
||
|
AES_IV aesIV = new AES_IV();
|
||
|
// AES的密钥长度最好是16位(不是必须)
|
||
|
String password = "ecology_nsh_2021";
|
||
|
// AES的向量长度必须为16位
|
||
|
String iv = "weaver_nsyh_2021";
|
||
|
aesIV.setPwd(password);
|
||
|
aesIV.setIv(iv);
|
||
|
// 加密
|
||
|
// System.out.println("加密前:" + loginid);
|
||
|
// String encodeResultStr = aesIV.encode(loginid);
|
||
|
//System.out.println("加密后:" + encodeResultStr);
|
||
|
// 解密
|
||
|
String decodeResultStr = aesIV.decode(loginid);
|
||
|
System.out.println(decodeResultStr);
|
||
|
}
|
||
|
}
|