package com.kym.admin.utils;

import cn.hutool.crypto.digest.DigestAlgorithm;
import cn.hutool.crypto.digest.Digester;

/**
 * @author skyline
 * @description 加盟商密码生成
 * @date 2023-08-11 16:01
 */
public class AdminAccountGenerator {
    public static void main(String[] args) {
        // 密码生成 先把账号md5，然后取前5位，然后把密码和这个5位字符拼接在一起，再md5
        var username = "18569535949";
        var password = "abc123";

        Digester md5 = new Digester(DigestAlgorithm.MD5);
        var str1 = md5.digestHex(username).substring(0,5);
        var str2 = md5.digestHex(password.concat(str1));
        System.out.println(str2);
    }
}
