예제 #1
0
 /// <summary>
 /// 获取文件MD5验证码
 /// </summary>
 /// <param name="path">文件路径</param>
 /// <returns></returns>
 public static string md5(string path)
 {
     try
     {
         return(MD5Crypto.getFileMd5(path));
     }
     catch { }
     return("");
 }
예제 #2
0
 /// <summary>
 /// 获取机器号
 /// </summary>
 /// <param name="prefix"></param>
 /// <returns></returns>
 public static string MachineId(string prefix)
 {
     return(MD5Crypto.encrypt32(prefix + Convert.ToChar(29) + CpuId + DiskIds[0] + MacAddress));
 }
예제 #3
0
 /// <summary>
 /// 获取机器号(可区分同机器不同软件)
 /// </summary>
 /// <param name="prefix">前置字符串</param>
 /// <param name="MachineId">机器号</param>
 /// <returns></returns>
 public static string MachineId(string prefix, string MachineId)
 {
     return(MD5Crypto.encrypt32(prefix + Convert.ToChar(29) + MachineId));
 }
예제 #4
0
 /// <summary>
 /// 获取机器号
 /// </summary>
 /// <returns></returns>
 public static string MachineId()
 {
     return(MD5Crypto.encrypt32(CpuId + DiskIds[0] + MacAddress));
 }