当前位置:首页 » 服务器技术
开发技术指南» 文章正文
    引言: 可以用来加/解密数据库用户、密码等 using System;using System.IO;using System.Text;using System.Security.Cryptography; namespace Common{/// <summary>/// Secur...
 

 

 ·c#学习杂记    »显示摘要«
    摘要:.net技术学习笔记:因为项目需要开始突击.net,今天主要了解了一下c#语法和.net框架基础,因为有java开发经验所以看起来倒也不是很费劲,就是不知道实际应用时会怎么样。今天的笔记分两大部分,c#语法杂记(一)和.net框架基础(一),比较凌乱的说: c#语法杂记(一): ◎ 在c#中,值类型(value)中的char类型声明的竟然是一个unicode字符类型,长度是16位的,这 和java,c等语言等语言差异真大,所以c#不会默认将char类型......
    摘要:sql server 存储过程的分页,这个问题已经讨论过几年了,很多朋友在问我,所以在此发表一下我的观点建立表: create table [testtable] ( [id] [int] identity (1, 1) not null , [firstname] [nvarchar] (100) collate chinese_prc_ci_as null , [lastname] [nvarchar] (100) collate chinese_p......


一个可以用来加密/解密的类(原创)

可以用来加/解密数据库用户、密码等

【相关文章:安装ACE

using system; 【扩展阅读:WebConfig中的Custom Er

【扩展信息:Linux 内核安全

using system.io;

using system.text;

using system.security.cryptography;

namespace common

{

 /// <summary>

 /// securityservice 的摘要说明。

 /// </summary>

 public class securityservice

 {

   static protected byte[] bytekey  = {125, 14, 45, 67, 112, 79, 77, 99, 37, 104, 13, 9, 118, 51, 87, 108};

   static protected byte[] byteiv  = {86, 19, 79, 15, 72, 58, 117, 45};

   static public string symmetricencrypt(string splaintext)

   {

   byte[] byteplaintext;

   memorystream encryptedstream;

   icryptotransform encryptor;

      cryptostream thecryptostream;

      if(splaintext=="")  return "";

   byteplaintext = encoding.ascii.getbytes(splaintext);

   encryptedstream = new memorystream(splaintext.length);

   encryptor = getencryptor();


...   下一页
    摘要:我们学习来看一下response对象。其实我们前面的教程中一直都在使用这个对象的write方法。 这里我们用response对象设置cookie。 ? 打开vb6,新建activex dll工程。工程名修改为fcom,类名修改为fz5 引用“microsoft active server pages object”对象库。 创建两个组件事件:onstartpage以及onendpage 在事件onstartpage中创建类sc......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE