91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 0.11M
    文件類型: .zip
    金幣: 1
    下載: 0 次
    發布日期: 2020-12-26
  • 語言: C#
  • 標簽: 加密??解密??d??demo??s??

資源簡介

 /// <summary>
        /// Base64解密
        /// </summary>
        /// <param name="Message">需要解密的加密字符串</param>
        /// <returns>解密后的字符串</returns>
        static public string Base64Decode(string Message)
        {
            if ((Message.Length % 4) != 0)
            {
                throw new ArgumentException("不是正確的BASE64編碼,請檢查。", "Message");
            }
            if (!System.Text.RegularExpressions.Regex.IsMatch(Message, "^[A-Z0-9/ =]*$", System.Text.RegularExpressions.RegexOptions.IgnoreCase))
            {
                throw new ArgumentException("包含不正確的BASE64編碼,請檢查。", "Message");
            }
            string Base64Code = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 /=";
            int page = Message.Length / 4;
            System.Collections.ArrayList outMessage = new System.Collections.ArrayList(page * 3);
            char[] message = Message.ToCharArray();
            for (int i = 0; i < page; i )
            {
                byte[] instr = new byte[4];
                instr[0] = (byte)Base64Code.IndexOf(message[i * 4]);
                instr[1] = (byte)Base64Code.IndexOf(message[i * 4 1]);
                instr[2] = (byte)Base64Code.IndexOf(message[i * 4 2]);
                instr[3] = (byte)Base64Code.IndexOf(message[i * 4 3]);
                byte[] outstr = new byte[3];
                outstr[0] = (byte)((instr[0] << 2) ^ ((instr[1] & 0x30) >> 4));
                if (instr[2] != 64)
                {
                    outstr[1] = (byte)((instr[1] << 4) ^ ((instr[2] & 0x3c) >> 2));
                }
                else
                {
                    outstr[1] = 0;//outstr[2] = 0;??
                }
                if (instr[3] != 64)
                {
                    outstr[2] = (byte)((instr[2] << 6) ^ instr[3]);
                }
                else
                {
                    outstr[2] = 0;
                }
                outMessage.Add(outstr[0]);
                if (outstr[1] != 0)
                    outMessage.Add(outstr[1]);
                if (outstr[2] != 0)
                    outMessage.Add(outstr[2]);
            }
            byte[] outbyte = (byte[])outMessage.ToArray(Type.GetType("System.Byte"));
            return System.Text.Encoding.Default.GetString(outbyte);
            //return System.Text.Encoding.ASCII.GetString(outbyte);
        }


資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.Net;
using?System.Text;
namespace?base64WindowsApplication17
{
????class?Class1
????//?public?class?base64Protector
????{
????????///?
????????///?base64加密
????????///?

????????///?需要加密的字符串
????????///?加密后的字符串
????????static?public?string?base64Code(string?Message)
????????{
????????????char[]?base64Code?=?new?char[]{‘A‘‘B‘‘C‘‘D‘‘E‘‘F‘‘G‘‘H‘‘I‘‘J‘‘K‘‘L‘‘M‘‘N‘‘O‘‘P‘‘Q‘‘R‘‘S‘‘T‘
????????????????????‘U‘‘V‘‘W‘‘X‘‘Y‘‘Z‘‘a‘‘b‘‘c‘‘d‘‘e‘‘f‘‘g‘‘h‘‘i‘‘j‘‘k‘‘l‘‘m‘‘n‘
????????????????????‘o‘‘p‘‘q‘‘r‘‘s‘‘t‘‘u‘‘v‘‘w‘‘x‘‘y‘‘z‘‘0‘‘1‘‘2‘‘3‘‘4‘‘5‘‘6‘‘7‘
?????????????????????‘8‘‘9‘‘+‘‘/‘‘=‘};
??????

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-09-19?16:22??base64解密研究\
?????目錄???????????0??2017-09-19?16:22??base64解密研究\.vs\
?????目錄???????????0??2017-09-19?16:22??base64解密研究\.vs\WindowsFormsApplication1\
?????目錄???????????0??2017-09-19?16:22??base64解密研究\.vs\WindowsFormsApplication1\v15\
?????文件???????55808??2017-09-19?16:28??base64解密研究\.vs\WindowsFormsApplication1\v15\.suo
?????目錄???????????0??2017-09-19?16:28??base64解密研究\WindowsFormsApplication1\
?????文件?????????187??2017-02-28?22:37??base64解密研究\WindowsFormsApplication1\App.config
?????文件????????5784??2017-03-07?14:40??base64解密研究\WindowsFormsApplication1\Class1.cs
?????文件????????5360??2017-06-30?22:17??base64解密研究\WindowsFormsApplication1\Form1.Designer.cs
?????文件????????1205??2017-09-19?16:28??base64解密研究\WindowsFormsApplication1\Form1.cs
?????文件????????5817??2017-06-30?22:17??base64解密研究\WindowsFormsApplication1\Form1.resx
?????文件?????????536??2017-02-28?22:37??base64解密研究\WindowsFormsApplication1\Program.cs
?????目錄???????????0??2017-09-19?16:22??base64解密研究\WindowsFormsApplication1\Properties\
?????文件????????1386??2017-02-28?22:37??base64解密研究\WindowsFormsApplication1\Properties\AssemblyInfo.cs
?????文件????????2900??2017-02-28?22:37??base64解密研究\WindowsFormsApplication1\Properties\Resources.Designer.cs
?????文件????????5612??2017-02-28?22:37??base64解密研究\WindowsFormsApplication1\Properties\Resources.resx
?????文件????????1111??2017-02-28?22:37??base64解密研究\WindowsFormsApplication1\Properties\Settings.Designer.cs
?????文件?????????249??2017-02-28?22:37??base64解密研究\WindowsFormsApplication1\Properties\Settings.settings
?????文件????????5446??2017-02-28?22:54??base64解密研究\WindowsFormsApplication1\WindowsFormsApplication1.csproj
?????文件?????????477??2017-02-28?22:54??base64解密研究\WindowsFormsApplication1\WindowsFormsApplication1.csproj.user
?????目錄???????????0??2017-09-19?16:22??base64解密研究\WindowsFormsApplication1\bin\
?????目錄???????????0??2017-09-19?16:22??base64解密研究\WindowsFormsApplication1\bin\Debug\
?????文件??????150016??2017-06-30?22:29??base64解密研究\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe
?????文件?????????187??2017-02-28?22:37??base64解密研究\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe.config
?????文件???????26112??2017-06-30?22:29??base64解密研究\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.pdb
?????文件???????22984??2017-04-13?11:38??base64解密研究\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe
?????文件?????????187??2017-02-28?22:37??base64解密研究\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.config
?????文件?????????490??2014-01-13?21:31??base64解密研究\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.manifest
?????目錄???????????0??2017-09-19?16:22??base64解密研究\WindowsFormsApplication1\obj\
?????目錄???????????0??2017-09-19?16:22??base64解密研究\WindowsFormsApplication1\obj\Debug\
?????文件??????????42??2017-09-19?16:24??base64解密研究\WindowsFormsApplication1\obj\Debug\CoreCompileInputs.cache
............此處省略16個文件信息

評論

共有 條評論