Esempio n. 1
0
        public void Init(long accountId)
        {
            //从数据库读取配置信息
            m_ak = "5fc0bc28cb9e47a18930b4a052e4250c";
            m_sk = "34534f37bb024bd3876e27703959ce0b1";

            m_timeStr = DateTime.Now.ToUniversalTime().ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ssK");
            m_auth    = HelperTool.GenAuth(m_ak, m_sk, m_timeStr, m_expirationSeconds, m_url, m_method);
        }
Esempio n. 2
0
        public void Init(string access, string secret, string path, string method = "POST")
        {
            m_timeStr = DateTime.Now.ToUniversalTime().ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ssK");
            m_access  = access;
            m_secret  = secret;
            m_url     = new Uri(string.Format(m_domainUrl, path));
            m_method  = method.ToUpper();

            m_auth = HelperTool.GenAuth(m_access, m_secret, m_timeStr, m_expirationSeconds, m_url, m_method);
        }