コード例 #1
0
        /// <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));
        }
コード例 #2
0
        /// <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));
        }