c# asp.net 字符串加密解密的类
using System;
using System.Collections.Generic;
using System.Text;
using System.Security.Cryptography;//Cryptography密码术
namespace DAL
{
public class Encry
{
public Encry() { }
#region AES加密
public static string Encrypt(string toEncrypt)
{
byte[] keyArray = UTF8Encoding.UTF8.GetBytes("12345678901234567890123456789012");
byte[] toEncryptArray = UTF8Encoding.UTF8.GetBytes(toEncrypt);
RijndaelManaged rDel = new RijndaelManaged();//using System.Security.Cryptography;
rDel.Key = keyArray;
rDel.Mode = CipherMode.ECB;//using System.Security.Cryptography;
rDel.Padding = PaddingMode.PKCS7;//using System.Security.Cryptography;
ICryptoTransform cTransform = rDel.CreateEncryptor();//using System.Security.Cryptography;
&nbs
相关文档:
通常javascript代码可以与HTML标签一起直接放在前端页面中,但如果JS代码多的话一方面不利于维护,另一方面也对搜索引擎不友好,因
为页面因此而变得臃肿;所以一般有良好开发习惯的程序员都会把javascript代码放到独立的js文件中,其他页面通过引入该js文件来使用相应的
javascript代码。
今天在做一个小新闻系统的管理 ......
<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<system.web>
<authorization>
< ......
分页代码如下(PageHelper.cs):
代码
1 using System;
2 using System.Collections.Generic;
3 using System.Collections.Specialized;
4 using System.Linq;
5 using System.Web;
......
一,JS动态创建表单
var result = " <form method='post' action='../xiazai.aspx'><table width='100%' border='0' cellpadding='0' cellspacing='1' bgcolor='#BDB4A2'>"+
"&l ......
一、ASP.NET Web Service代码
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Data.SqlClient;
namespace WebService1
{
/// <sum ......