KKSU
2025-02-07 8a467f4b887967382c6bb7e15d0d61e382e4f1c3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package cc.mrbird.febs.pay.util;
 
public class HashUtils {
 
    public static String md5(String input) {
        try {
            java.security.MessageDigest md = java.security.MessageDigest.getInstance("MD5");
            byte[] array = md.digest(input.getBytes());
            StringBuilder sb = new StringBuilder();
            for (byte b : array) {
                sb.append(String.format("%02x", b));
            }
            return sb.toString();
        } catch (java.security.NoSuchAlgorithmException e) {
            throw new RuntimeException(e);
        }
    }
}