关于什么:
import java.security.MessageDigest;import java.security.NoSuchAlgorithmException;import java.util.Formatter;public static String SHAsum(byte[] convertme) throws NoSuchAlgorithmException{ MessageDigest md = MessageDigest.getInstance("SHA-1"); return byteArray2Hex(md.digest(convertme));}private static String byteArray2Hex(final byte[] hash) { Formatter formatter = new Formatter(); for (byte b : hash) { formatter.format("%02x", b); } return formatter.toString();}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)