using System;
using System.Collections.Generic;
using System.Text;
using JuSNS.Common;

namespace JuSNS.ApiInterface
{
    public class SecretUser
    {
        /// <summary>
        /// 加密
        /// </summary>
        /// <param name="Str"></param>
        /// <returns></returns>
        static public string EncryptUserID(string Str)
        {
            return DES.Encrypt(Str, Config.SecretConfig.UserAppKey, Config.SecretConfig.UserAppIV);
        }
        /// <summary>
        /// 解密
        /// </summary>
        /// <param name="encStr"></param>
        /// <returns></returns>
        static public string DecryptUserID(string encStr)
        {
            return DES.Decrypt(encStr, Config.SecretConfig.UserAppKey, Config.SecretConfig.UserAppIV);
        }
    }
}
