加密

Shiro加密:

//加密算法 String hashAlgorithName="MD5"; //加密明文 String credentials="123456"; //加密盐值 ByteSource salt = null; //加密盐值 //盐值通常取唯一的,我们这用用户名作为盐值 //ByteSource salt= ByteSource.Util.bytes(username); //加密次数 int hashIterations = 1024; Object password = new SimpleHash(hashAlgorithName,credentials,salt,hashIterations);

原文地址:https://www.cnblogs.com/mryangbo/p/8127889.html