生成密码

package me.cf81.util;


import me.cf81.commons.utils.EncryptUtils;

import java.util.UUID;

/**
 * 生成密码
 *
 */
public class GeneratePassword {

    public void testPassword() {
        String loginName = "userName";
        String salt = UUID.randomUUID().toString().replace("-", "");
        System.out.println(salt);
        String password = EncryptUtils.SHA256Encode("password" + salt);
        System.out.println(password);
    }

}

 

posted @ 2017-06-28 11:09  次序  阅读(186)  评论(0编辑  收藏  举报