Пример #1
0
        /// <summary>
        /// 生成上传Token
        /// </summary>
        /// <returns></returns>
        public string Token(Mac mac = null)
        {
            if (mac == null)
            {
                mac = new Mac(Config.ACCESS_KEY, Config.Encoding.GetBytes(Config.SECRET_KEY));
            }
            string flag = QiniuJsonHelper.JsonEncode(this);

            return(mac.SignWithData(Config.Encoding.GetBytes(flag)));
        }
Пример #2
0
 public override string ToString()
 {
     return(QiniuJsonHelper.JsonEncode(this));
 }