/// <summary> /// 生成秘钥 /// </summary> /// <param name="appId"></param> /// <param name="clientType"></param> /// <param name="deviceNo"></param> /// <param name="nonce"></param> /// <returns></returns> public static string GetAppSecret(string appId, string clientType, string deviceNo, string nonce) { var str = $"{appId}{clientType}{deviceNo}{nonce}"; return(AESHelper.AESEncrypt(str, PrivateSecretKey)); }
/// <summary> /// 生成Token /// </summary> /// <param name="userName"></param> /// <param name="deviceNo"></param> /// <param name="ticket"></param> /// <param name="nonce"></param> /// <returns></returns> public static string GetToken(string userName, string deviceNo, string ticket, string nonce) { var str = $"{userName}{deviceNo}{ticket}{nonce}"; return(AESHelper.AESEncrypt(str)); }