25 lines
		
	
	
		
			574 B
		
	
	
	
		
			C#
		
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			574 B
		
	
	
	
		
			C#
		
	
	
 | 
						|
using System.Security.Cryptography;
 | 
						|
using System.Text;
 | 
						|
 | 
						|
namespace IRaCIS.Core.Application.Services
 | 
						|
{
 | 
						|
    static class IdentifierHelper
 | 
						|
    {
 | 
						|
        //private static MD5 md5 = new MD5CryptoServiceProvider
 | 
						|
        //
 | 
						|
        private static MD5 md5 = MD5.Create();
 | 
						|
 | 
						|
        private static object lockObj =new object();
 | 
						|
 | 
						|
        public static Guid CreateGuid(params string[] parts)
 | 
						|
        {
 | 
						|
            lock (lockObj)
 | 
						|
            {
 | 
						|
                return new Guid(md5.ComputeHash(Encoding.UTF8.GetBytes(string.Concat(parts))));
 | 
						|
            }
 | 
						|
           
 | 
						|
        }
 | 
						|
    }
 | 
						|
}
 |