Himall商城Api签名帮助类

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Security.Cryptography;

namespace Himall.Core.Helper
{
    ///


    /// Api签名帮助类
    ///

    public class ApiSignHelper
    {
        ///
        /// DateTime时间格式转换为Unix时间戳格式
        ///

        /// DateTime时间格式
        /// Unix时间戳格式
        public static long ConvertDateTimeInt(System.DateTime time)
        {
            System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1, 0, 0, 0, 0));
            DateTime dtResult = time;           
            long t = (dtResult.Ticks - startTime.Ticks) / 10000; //

你可能感兴趣的:(himall商城,c#,开发语言)