App_Code/Components/PblogDes.cs

(开头部分) 2KB

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

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Security.Cryptography;
using System.Text;
using System.IO;

/// <summary>
/// PblogDes 的摘要说明
/// </summary>
public class PblogDes
{
    // Fields
    private string key;

    // Methods
    public PblogDes()
    {
        this.key = "PblogKey";
    }

    public PblogDes(string key)
    {
        this.key = key;
    }

    public string Decrypt(string s)
    {
        return this.Decrypt(s, this.key);
    }

    private string Decrypt(string pToDecrypt, string sKey)
    {
        DESCryptoServiceProvider provider = new DESCryptoServiceProvider();
        byte[] buffer = new byte[pToDecrypt.Length / 2];
        for (int i = 0; i < (pToDecrypt.Length / 2); i++)
        {
            int num2 = Convert.ToInt32(pToDecrypt.Substring(i * 2, 2), 0x10);
            buffer[i] = (byte)num2;
        }
        provider.Key = Encoding.ASCII.GetBytes(sKey);
        provider.IV = Encoding.ASCII.GetBytes(sKey);
        MemoryStream stream = new MemoryStream();
        CryptoStream stream2 = new CryptoStream(stream, provider.CreateDecryptor(), CryptoStreamMode.Write);
        stream2.Write(buffer, 0, buffer.Length);
        stream2.FlushFinalBlock();
        new StringBuilder();
        return Encoding.Default.GetString(stream.ToArray());
    }

    public string Encrypt(string s)
    {
        return this.Encrypt(s, this.key);
    }
后面还有 22 行代码,解锁后查看完整代码

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

AI 解读

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

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