Exemplo n.º 1
0
        /// <summary>
        /// 对用户ID进行DES加密
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        public static string EncryptUserIdByDes(string userId)
        {
            if (userId.IsNullOrEmpty())
            {
                return("");
            }

            string val = userId + "," + DateTime.Now.Ticks;

            return(CryptographyUtils.DesEncrypt(val, UserIdDesSecretKey));
        }
Exemplo n.º 2
0
 /// <summary>
 /// 对手机号进行DES加密
 /// </summary>
 /// <param name="mobile"></param>
 /// <returns></returns>
 public static string EncryptMobileFromApp(string mobile)
 {
     return(mobile.IsNullOrEmpty() ? "" : CryptographyUtils.DesEncrypt(mobile, AppCreditDesSecretKey));
 }