24 lines
433 B
Java
24 lines
433 B
Java
package com.sunyard.ssp.utils;
|
|
|
|
import java.security.NoSuchAlgorithmException;
|
|
import java.security.SecureRandom;
|
|
|
|
/**
|
|
* @author liulu
|
|
* @since 2025/1/14
|
|
*/
|
|
public abstract class RandomUtils {
|
|
|
|
|
|
|
|
public static SecureRandom getRandom() {
|
|
try {
|
|
return SecureRandom.getInstance("SHA1PRNG");
|
|
} catch (NoSuchAlgorithmException e) {
|
|
throw new IllegalArgumentException(e);
|
|
}
|
|
}
|
|
|
|
|
|
}
|