Shop/src/util/RandomGUID.java
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
package util;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.security.*;
import java.util.Random;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
public class RandomGUID
{
private static Log log;
public String valueBeforeMD5;
public String valueAfterMD5;
private static Random myRand;
private static SecureRandom mySecureRand;
private static String s_id;
public RandomGUID()
{
valueBeforeMD5 = "";
valueAfterMD5 = "";
getRandomGUID(false);
}
public RandomGUID(boolean secure)
{
valueBeforeMD5 = "";
valueAfterMD5 = "";
getRandomGUID(secure);
}
private void getRandomGUID(boolean secure)
{
MessageDigest md5 = null;
StringBuffer sbValueBeforeMD5 = new StringBuffer();
try
{
md5 = MessageDigest.getInstance("MD5");
}
catch(NoSuchAlgorithmException nosuchalgorithmexception) { }
try
{
long time = System.currentTimeMillis();
long rand = 0L;
if(secure)
{
rand = mySecureRand.nextLong();
} else
{
rand = myRand.nextLong();
}
sbValueBeforeMD5.append(s_id);
sbValueBeforeMD5.append(":");
sbValueBeforeMD5.append(Long.toString(time));
sbValueBeforeMD5.append(":");
sbValueBeforeMD5.append(Long.toString(rand));
valueBeforeMD5 = sbValueBeforeMD5.toString();
md5.update(valueBeforeMD5.getBytes());
后面还有 55 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。