package com.huatek.busi.common;

import cn.hutool.core.net.NetUtil;
import cn.hutool.core.util.StrUtil;
import org.apache.commons.codec.binary.Hex;

import java.io.File;
import java.io.IOException;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.List;
import java.util.SortedMap;

public class Md5Util {
    public static final String DANGLE_CONTENT = "Xinying";
    public static final int DANGLE_CODE_FAIL = 13;
    public static String md5(String  text)  {
        MessageDigest messageDigest = null;
        try {
            messageDigest = MessageDigest.getInstance("MD5");
        } catch (NoSuchAlgorithmException e) {
            e.printStackTrace();
        }
        byte[] bytes = messageDigest.digest(text.getBytes());
        return Hex.encodeHexString(bytes);

    }


}
