RolePermission.Common/Encrypt.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.IO;
using System.Security.Cryptography;
using System.Text;

namespace RolePermission.Common
{
    public static class Encrypt
    {
        private const string ENCRYPT_KEY = "RolePermission";

        /// <summary>
        /// 加密
        /// </summary>
        /// <param name="strText"></param>
        /// <returns></returns>
        public static string DecodeText(string strText)
        {
            return Decode(strText, ENCRYPT_KEY);
        }
        /// <summary>
        ///  加密
        /// </summary>
        /// <param name="strText"></param>
        /// <param name="strKey"></param>
        /// <returns></returns>
        public static string DecodeText(string strText, string strKey)
        {
            return Decode(strText, strKey);
        }

        /// <summary>
        /// 解密
        /// </summary>
        /// <param name="strText"></param>
        /// <returns></returns>
        public static string UnDecodeText(string strText)
        {
            return UnDecode(strText, ENCRYPT_KEY);
        }
        /// <summary>
        /// 解密
        /// </summary>
        /// <param name="strText">要解密的字串</param>
        /// <param name="strKey">解密密匙</param>
        /// <returns>解密后的字符串</returns>
        public static string UnDecodeText(string strText, string strKey)
        {
            return UnDecode(strText, strKey);
        }

        /// <summary>
        /// 加密函数
        /// </summary>
        /// <param name="strText"></param>
        /// <param name="strEncrKey"></param>
        /// <returns></returns>
        private static string Decode(string strText, string strEncrKey)
        {
后面还有 37 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。