public static string CreateVerificationCode(EncryptionAndDecryption.UMPKeyAndIVType aKeyIVID) { string lStrReturn; int LIntRand; Random lRandom = new Random(); string LStrTemp; try { lStrReturn = DateTime.Now.ToString("yyyyMMddHHmmss"); LIntRand = lRandom.Next(0, 14); LStrTemp = LIntRand.ToString("00"); lStrReturn = lStrReturn.Insert(LIntRand, "VCT"); LIntRand = lRandom.Next(0, 17); LStrTemp += LIntRand.ToString("00"); lStrReturn = lStrReturn.Insert(LIntRand, "UMP"); LIntRand = lRandom.Next(0, 20); LStrTemp += LIntRand.ToString("00"); lStrReturn = lStrReturn.Insert(LIntRand, ((int)aKeyIVID).ToString("000")); lStrReturn = EncryptionAndDecryption.EncryptStringY(LStrTemp + lStrReturn); } catch { lStrReturn = string.Empty; } return(lStrReturn); }
private static string CreateVerificationCode(EncryptionAndDecryption.UMPKeyAndIVType keyIVID) { string strReturn; Random random = new Random(); string strTemp; try { strReturn = DateTime.Now.ToString("yyyyMMddHHmmss"); int intRand = random.Next(0, 14); strTemp = intRand.ToString("00"); strReturn = strReturn.Insert(intRand, "VCT"); intRand = random.Next(0, 17); strTemp += intRand.ToString("00"); strReturn = strReturn.Insert(intRand, "UMP"); intRand = random.Next(0, 20); strTemp += intRand.ToString("00"); strReturn = strReturn.Insert(intRand, ((int)keyIVID).ToString("000")); strReturn = EncryptionAndDecryption.EncryptStringY(strTemp + strReturn); } catch { strReturn = string.Empty; } return(strReturn); }
public static string CreateVerificationCode(int AIntKeyIVID) { string LStrReturn = string.Empty; int LIntRand = 0; string LStrTemp = string.Empty; try { Random LRandom = new Random(); LStrReturn = DateTime.Now.ToString("yyyyMMddHHmmss"); LIntRand = LRandom.Next(0, 14); LStrTemp = LIntRand.ToString("00"); LStrReturn = LStrReturn.Insert(LIntRand, "VCT"); LIntRand = LRandom.Next(0, 17); LStrTemp += LIntRand.ToString("00"); LStrReturn = LStrReturn.Insert(LIntRand, "UMP"); LIntRand = LRandom.Next(0, 20); LStrTemp += LIntRand.ToString("00"); LStrReturn = LStrReturn.Insert(LIntRand, AIntKeyIVID.ToString("000")); LStrReturn = EncryptionAndDecryption.EncryptStringY(LStrTemp + LStrReturn); } catch { LStrReturn = string.Empty; } return(LStrReturn); }
static private string CreateVerificationCode(EncryptionAndDecryption.UMPKeyAndIVType AKeyIVID) { lock (syncRoot) { string LStrReturn = string.Empty; int LIntRand = 0; string LStrTemp = string.Empty; try { Random LRandom = new Random(); LStrReturn = DateTime.Now.ToString("yyyyMMddHHmmss"); LIntRand = LRandom.Next(0, 14); LStrTemp = LIntRand.ToString("00"); LStrReturn = LStrReturn.Insert(LIntRand, "VCT"); LIntRand = LRandom.Next(0, 17); LStrTemp += LIntRand.ToString("00"); LStrReturn = LStrReturn.Insert(LIntRand, "UMP"); LIntRand = LRandom.Next(0, 20); LStrTemp += LIntRand.ToString("00"); LStrReturn = LStrReturn.Insert(LIntRand, ((int)AKeyIVID).ToString("000")); LStrReturn = EncryptionAndDecryption.EncryptStringY(LStrTemp + LStrReturn); } catch { LStrReturn = string.Empty; } return(LStrReturn); } }