惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Secure Thoughts
Security Latest
Security Latest
Simon Willison's Weblog
Simon Willison's Weblog
O
OpenAI News
GbyAI
GbyAI
L
LINUX DO - 最新话题
A
Arctic Wolf
T
Tor Project blog
G
GRAHAM CLULEY
I
InfoQ
博客园_首页
IT之家
IT之家
The Register - Security
The Register - Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
The GitHub Blog
The GitHub Blog
Blog — PlanetScale
Blog — PlanetScale
N
Netflix TechBlog - Medium
K
Kaspersky official blog
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题
U
Unit 42
PCI Perspectives
PCI Perspectives
量子位
P
Palo Alto Networks Blog
S
Securelist
T
Troy Hunt's Blog
博客园 - 【当耐特】
Recorded Future
Recorded Future
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
S
Security Affairs
Engineering at Meta
Engineering at Meta
T
The Blog of Author Tim Ferriss
博客园 - 聂微东
罗磊的独立博客
N
News and Events Feed by Topic
人人都是产品经理
人人都是产品经理
B
Blog RSS Feed
NISL@THU
NISL@THU
C
Cisco Blogs
T
Threatpost
有赞技术团队
有赞技术团队
Forbes - Security
Forbes - Security
Hugging Face - Blog
Hugging Face - Blog
Last Week in AI
Last Week in AI
T
The Exploit Database - CXSecurity.com
Cloudbric
Cloudbric
Cyberwarzone
Cyberwarzone
Google DeepMind News
Google DeepMind News
C
Cyber Attacks, Cyber Crime and Cyber Security

博客园 - samuel's blog

想了很久,我决定换BLOG了. FANSMI音乐下载器原理 启动带参数的线程 哈,俺又回来了! [原创]在C#中实现插件编程 [转]利用XMLHTTP无刷新自动实时更新数据 [转]SYN Flood的C++程序 - samuel's blog 觉得我的BLOG“好像”冷了哦! 师兄写的一个JAVA播放器的源代码 向面连接的ADO.NET 水晶报表的使用技巧 无聊,,,,,吼两声!!!!!!!!!!!!!!! 按需要生成你的"网站导航"栏 ASP.NET中使用托管组件 八种和电脑相关的易发病 最近不更新啦! 看完了没一个能活下的,都笑死了[转] SQL SERVER的视图、存储过程等 国产门户网站和思想强奸!
无聊之极的无聊之“作”,C#加密程序
samuel's blog · 2006-02-11 · via 博客园 - samuel's blog

最近无聊写了一个字符串加密、解密的函数。。。。。。。。
这个算法简单勒。俺把它称为BT加密。呵呵。为什么叫BT(变态)加密法喃?
呵呵,那就是因为它的加密结果喽!呵呵。。用这个加密函数加密字符串http://maxun.cnblogs.com试试,哈哈。
得到的一定是一串“口”吧?HOHO。经过实验。并不是所有的字符串加密后都是“口”。。。呵呵,有兴趣的朋友可以自己试试嘛:)

注:该算法没有任何技术性内容,只是个人无聊之极的无聊之“作”,请不要用做其他目的,否则后果自负!呵呵哈!

using System;
using System.Text;

namespace Include
{
 public class cls_Include
 {
  public cls_Include()
  {
  }

  // 输出的加密函数
  public string fun_Enptry(string v_string_process)
  {
   string v_string_str1 = "";
           
   v_string_str1 = v_string_process;
   for(int i=0;i<100;i++)
    v_string_str1 = fun_Enptry_nb(v_string_str1);
   return(v_string_str1);
  }

  // 输出的解密函数
  public string fun_Deptry(string v_string_process)
  {
   string v_string_str1 = "";
   v_string_str1 = v_string_process;
   for(int i=0;i<100;i++)
    v_string_str1 = fun_Deptry_nb(v_string_str1);
   return(v_string_str1);
  }
  // 加密函数
  private string fun_Enptry_nb(string v_string_process)
  {
   string v_string_temp1 = "";
   char cTemp;
   string v_string_out = "";

   v_string_temp1 = v_string_process;

   try
   {
    for(int i=0;i<v_string_temp1.Length;i++)
    {
     cTemp = Convert.ToChar(v_string_temp1[(v_string_temp1.Length-1) - i] + v_string_temp1.Length);
     v_string_out += cTemp;
    }
   }
   catch(Exception exc)
   {
    Console.Out.Write(exc.ToString());
    v_string_out = "SUCCESS_ERROR";
   }
   return(v_string_out);
  }

  // 解密函数
  private string fun_Deptry_nb(string v_string_process)
  {
   string v_string_temp1 = "";
   char cTemp;
   string v_string_out = "";

   v_string_temp1 = v_string_process;

   try
   {
    for(int i=0;i<v_string_temp1.Length;i++)
    {
     cTemp = Convert.ToChar(v_string_temp1[(v_string_temp1.Length-1) - i] - v_string_temp1.Length);
     v_string_out += cTemp;
    }
   }
   catch(Exception exc)
   {
    Console.Out.Write(exc.ToString());
    v_string_out = "SUCCESS_ERROR";
   }
   return(v_string_out);
  }
 }
}