public class EncryptUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
HASH_ALGORITHM_NAME
加密算法
|
static int |
HASH_ITERATIONS
加密循环次数
|
| Constructor and Description |
|---|
EncryptUtil() |
| Modifier and Type | Method and Description |
|---|---|
static String |
encrypt(String password,
String salt)
加密处理
|
static String |
encrypt(String password,
String salt,
String hashAlgorithmName,
int hashIterations)
加密处理
|
static String |
getRandomSalt()
获取随机盐值
|
public static final String HASH_ALGORITHM_NAME
public static final int HASH_ITERATIONS
public static String encrypt(String password, String salt)
password - 密码salt - 密码盐public static String encrypt(String password, String salt, String hashAlgorithmName, int hashIterations)
password - 密码salt - 密码盐hashAlgorithmName - 加密算法hashIterations - 加密循环次数public static String getRandomSalt()
Copyright © 2022. All rights reserved.