注: C#已亲测及做扩展, Java 部分未做验证

/// <summary>
/// 3DES加密解密
/// -----------------------------------------------------------
/// 说明:
/// 转载自网上http://bbs.csdn.net/topics/350158619
/// 并加以扩展
/// 修正:
/// 1. 修改正解密后出现 '\0'
/// 注: 1. 向量不能小于8位
/// 2. 明文末尾如果是带'\0'字符,则会一起去掉
/// -----------------------------------------------------------
/// 扩展人:Wuyf    11222337#qq.com
/// 日 期:2014-11-29
/// </summary>

C# 代码

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Web; namespace WuFrame.Tool
{
/// <summary>
/// 3DES 加密解密
/// -----------------------------------------------------------
/// 说明:
/// 转载自网上http://bbs.csdn.net/topics/350158619
/// 并加以扩展
/// 修正:
/// 1. 修改正解密后出现 '\0'
/// 注: 1. Key必须为24位
/// 2. 向量不能小于8位
/// 3. 明文末尾如果是带'\0'字符,则会一起去掉
/// -----------------------------------------------------------
/// 扩展人:Wuyf 11222337#qq.com
/// 日 期:2014-11-29
/// </summary>
public class Des3Tool
{
#region CBC模式** #region 扩展方法 /// <summary>
/// 3DES 加密(字符串参数和返回值)
/// </summary>
/// <param name="key">密钥</param>
/// <param name="iv">向量</param>
/// <param name="data">明文</param>
/// <param name="isRetBase64">true:返回base64,false:返回Utf8</param>
/// <returns></returns>
public static string Des3EncodeCBC(string key, string iv, string data)
{
string rtnResult = string.Empty;
byte[] rtnValue = null;
byte[] keyArr = Encoding.UTF8.GetBytes(key);
byte[] ivArr = Encoding.UTF8.GetBytes(iv);
byte[] dataArr = Encoding.UTF8.GetBytes(data); rtnValue = Des3EncodeCBC(keyArr, ivArr, dataArr); rtnResult = Convert.ToBase64String(rtnValue); return rtnResult;
} /// <summary>
/// 3DES 解密(字符串参数和返回值)
/// </summary>
/// <param name="key">密钥</param>
/// <param name="iv">向量</param>
/// <param name="data">明文</param>
/// <returns></returns>
public static string Des3DecodeCBC(string key, string iv, string dataEnBase64)
{
string rtnResult = string.Empty;
byte[] rtnValue = null;
byte[] keyArr = Encoding.UTF8.GetBytes(key);
byte[] ivArr = Encoding.UTF8.GetBytes(iv);
byte[] dataArr = Convert.FromBase64String(dataEnBase64); rtnValue = Des3DecodeCBC(keyArr, ivArr, dataArr); rtnResult = Encoding.UTF8.GetString(rtnValue).TrimEnd('\0'); // 去除多余空字符 return rtnResult;
} /// <summary>
/// 3DES 解密(字符串参数和返回值)
/// </summary>
/// <param name="key">密钥</param>
/// <param name="iv">向量</param>
/// <param name="data">明文</param>
/// <returns></returns>
public static string Des3DecodeCBC(string key, string iv, byte[] dataArr)
{
string rtnResult = string.Empty;
byte[] rtnValue = null;
byte[] keyArr = Encoding.UTF8.GetBytes(key);
byte[] ivArr = Encoding.UTF8.GetBytes(iv); rtnValue = Des3DecodeCBC(keyArr, ivArr, dataArr); rtnResult = Encoding.UTF8.GetString(rtnValue).TrimEnd('\0'); // 去除多余空字符 return rtnResult;
} #endregion #region 原加解密方法 /// <summary>
/// DES3 CBC模式加密
/// </summary>
/// <param name="key">密钥</param>
/// <param name="iv">IV</param>
/// <param name="data">明文的byte数组</param>
/// <returns>密文的byte数组</returns>
public static byte[] Des3EncodeCBC(byte[] key, byte[] iv, byte[] data)
{
//复制于MSDN try
{
// Create a MemoryStream.
MemoryStream mStream = new MemoryStream(); TripleDESCryptoServiceProvider tdsp = new TripleDESCryptoServiceProvider();
tdsp.Mode = CipherMode.CBC; //默认值
tdsp.Padding = PaddingMode.PKCS7; //默认值 // Create a CryptoStream using the MemoryStream
// and the passed key and initialization vector (IV).
CryptoStream cStream = new CryptoStream(mStream,
tdsp.CreateEncryptor(key, iv),
CryptoStreamMode.Write); // Write the byte array to the crypto stream and flush it.
cStream.Write(data, , data.Length);
cStream.FlushFinalBlock(); // Get an array of bytes from the
// MemoryStream that holds the
// encrypted data.
byte[] ret = mStream.ToArray(); // Close the streams.
cStream.Close();
mStream.Close(); // Return the encrypted buffer.
return ret;
}
catch (CryptographicException e)
{
Console.WriteLine("A Cryptographic error occurred: {0}", e.Message);
return null;
}
} /// <summary>
/// DES3 CBC模式解密
/// </summary>
/// <param name="key">密钥</param>
/// <param name="iv">IV</param>
/// <param name="data">密文的byte数组</param>
/// <returns>明文的byte数组</returns>
public static byte[] Des3DecodeCBC(byte[] key, byte[] iv, byte[] data)
{
try
{
// Create a new MemoryStream using the passed
// array of encrypted data.
MemoryStream msDecrypt = new MemoryStream(data); TripleDESCryptoServiceProvider tdsp = new TripleDESCryptoServiceProvider();
tdsp.Mode = CipherMode.CBC;
tdsp.Padding = PaddingMode.PKCS7; // Create a CryptoStream using the MemoryStream
// and the passed key and initialization vector (IV).
CryptoStream csDecrypt = new CryptoStream(msDecrypt,
tdsp.CreateDecryptor(key, iv),
CryptoStreamMode.Read); // Create buffer to hold the decrypted data.
byte[] fromEncrypt = new byte[data.Length]; // Read the decrypted data out of the crypto stream
// and place it into the temporary buffer.
csDecrypt.Read(fromEncrypt, , fromEncrypt.Length); //Convert the buffer into a string and return it.
return fromEncrypt;
}
catch (CryptographicException e)
{
Console.WriteLine("A Cryptographic error occurred: {0}", e.Message);
return null;
}
} #endregion #endregion #region ECB模式 #region 不提供Iv(扩展方法) private static string ivDefault = ""; /// <summary>
/// 3DES 加密(字符串参数和返回值)
/// </summary>
/// <param name="key">密钥</param>
/// <param name="iv">向量</param>
/// <param name="data">明文</param>
/// <param name="isRetBase64">true:返回base64,false:返回Utf8</param>
/// <returns></returns>
public static string Des3EncodeECB(string key, string data)
{
string rtnResult = string.Empty;
byte[] rtnValue = null;
byte[] keyArr = Encoding.UTF8.GetBytes(key);
byte[] ivArr = Encoding.UTF8.GetBytes(ivDefault);
byte[] dataArr = Encoding.UTF8.GetBytes(data); rtnValue = Des3EncodeCBC(keyArr, ivArr, dataArr); rtnResult = Convert.ToBase64String(rtnValue); return rtnResult;
} /// <summary>
/// 3DES 解密(字符串参数和返回值)
/// </summary>
/// <param name="key">密钥</param>
/// <param name="iv">向量</param>
/// <param name="data">明文</param>
/// <returns></returns>
public static string Des3DecodeECB(string key, string dataEnBase64)
{
string rtnResult = string.Empty;
byte[] rtnValue = null;
byte[] keyArr = Encoding.UTF8.GetBytes(key);
byte[] ivArr = Encoding.UTF8.GetBytes(ivDefault);
byte[] dataArr = Convert.FromBase64String(dataEnBase64); rtnValue = Des3DecodeCBC(keyArr, ivArr, dataArr); rtnResult = Encoding.UTF8.GetString(rtnValue).TrimEnd('\0'); // 去除多余空字符 return rtnResult;
} /// <summary>
/// 3DES 解密(字符串参数和返回值)
/// </summary>
/// <param name="key">密钥</param>
/// <param name="iv">向量</param>
/// <param name="data">明文</param>
/// <returns></returns>
public static string Des3DecodeECB(string key, byte[] dataArr)
{
string rtnResult = string.Empty;
byte[] rtnValue = null;
byte[] keyArr = Encoding.UTF8.GetBytes(key);
byte[] ivArr = Encoding.UTF8.GetBytes(ivDefault); rtnValue = Des3DecodeECB(keyArr, ivArr, dataArr); rtnResult = Encoding.UTF8.GetString(rtnValue).TrimEnd('\0'); // 去除多余空字符 return rtnResult;
}
#endregion #region 提供Iv(扩展方法) /// <summary>
/// 3DES 加密(字符串参数和返回值)
/// </summary>
/// <param name="key">密钥</param>
/// <param name="iv">向量</param>
/// <param name="data">明文</param>
/// <param name="isRetBase64">true:返回base64,false:返回Utf8</param>
/// <returns></returns>
public static string Des3EncodeECB(string key, string iv, string data)
{
string rtnResult = string.Empty;
byte[] rtnValue = null;
byte[] keyArr = Encoding.UTF8.GetBytes(key);
byte[] ivArr = Encoding.UTF8.GetBytes(iv);
byte[] dataArr = Encoding.UTF8.GetBytes(data); rtnValue = Des3EncodeCBC(keyArr, ivArr, dataArr); rtnResult = Convert.ToBase64String(rtnValue); return rtnResult;
} /// <summary>
/// 3DES 解密(字符串参数和返回值)
/// </summary>
/// <param name="key">密钥</param>
/// <param name="iv">向量</param>
/// <param name="data">明文</param>
/// <returns></returns>
public static string Des3DecodeECB(string key, string iv, string dataEnBase64)
{
string rtnResult = string.Empty;
byte[] rtnValue = null;
byte[] keyArr = Encoding.UTF8.GetBytes(key);
byte[] ivArr = Encoding.UTF8.GetBytes(iv);
byte[] dataArr = Convert.FromBase64String(dataEnBase64); rtnValue = Des3DecodeCBC(keyArr, ivArr, dataArr); rtnResult = Encoding.UTF8.GetString(rtnValue).TrimEnd('\0'); // 去除多余空字符 return rtnResult;
} /// <summary>
/// 3DES 解密(字符串参数和返回值)
/// </summary>
/// <param name="key">密钥</param>
/// <param name="iv">向量</param>
/// <param name="data">明文</param>
/// <returns></returns>
public static string Des3DecodeECB(string key, string iv, byte[] dataArr)
{
string rtnResult = string.Empty;
byte[] rtnValue = null;
byte[] keyArr = Encoding.UTF8.GetBytes(key);
byte[] ivArr = Encoding.UTF8.GetBytes(iv); rtnValue = Des3DecodeECB(keyArr, ivArr, dataArr); rtnResult = Encoding.UTF8.GetString(rtnValue).TrimEnd('\0'); // 去除多余空字符 return rtnResult;
} #endregion #region 原加解密方法 /// <summary>
/// DES3 ECB模式加密
/// </summary>
/// <param name="key">密钥</param>
/// <param name="iv">IV(当模式为ECB时,IV无用)</param>
/// <param name="str">明文的byte数组</param>
/// <returns>密文的byte数组</returns>
public static byte[] Des3EncodeECB(byte[] key, byte[] iv, byte[] data)
{
try
{
// Create a MemoryStream.
MemoryStream mStream = new MemoryStream(); TripleDESCryptoServiceProvider tdsp = new TripleDESCryptoServiceProvider();
tdsp.Mode = CipherMode.ECB;
tdsp.Padding = PaddingMode.PKCS7;
// Create a CryptoStream using the MemoryStream
// and the passed key and initialization vector (IV).
CryptoStream cStream = new CryptoStream(mStream,
tdsp.CreateEncryptor(key, iv),
CryptoStreamMode.Write); // Write the byte array to the crypto stream and flush it.
cStream.Write(data, , data.Length);
cStream.FlushFinalBlock(); // Get an array of bytes from the
// MemoryStream that holds the
// encrypted data.
byte[] ret = mStream.ToArray(); // Close the streams.
cStream.Close();
mStream.Close(); // Return the encrypted buffer.
return ret;
}
catch (CryptographicException e)
{
Console.WriteLine("A Cryptographic error occurred: {0}", e.Message);
return null;
} } /// <summary>
/// DES3 ECB模式解密
/// </summary>
/// <param name="key">密钥</param>
/// <param name="iv">IV(当模式为ECB时,IV无用)</param>
/// <param name="str">密文的byte数组</param>
/// <returns>明文的byte数组</returns>
public static byte[] Des3DecodeECB(byte[] key, byte[] iv, byte[] data)
{
try
{
// Create a new MemoryStream using the passed
// array of encrypted data.
MemoryStream msDecrypt = new MemoryStream(data); TripleDESCryptoServiceProvider tdsp = new TripleDESCryptoServiceProvider();
tdsp.Mode = CipherMode.ECB;
tdsp.Padding = PaddingMode.PKCS7; // Create a CryptoStream using the MemoryStream
// and the passed key and initialization vector (IV).
CryptoStream csDecrypt = new CryptoStream(msDecrypt,
tdsp.CreateDecryptor(key, iv),
CryptoStreamMode.Read); // Create buffer to hold the decrypted data.
byte[] fromEncrypt = new byte[data.Length]; // Read the decrypted data out of the crypto stream
// and place it into the temporary buffer.
csDecrypt.Read(fromEncrypt, , fromEncrypt.Length); //Convert the buffer into a string and return it.
return fromEncrypt;
}
catch (CryptographicException e)
{
Console.WriteLine("A Cryptographic error occurred: {0}", e.Message);
return null;
}
} #endregion #endregion /// <summary>
/// 类测试
/// </summary>
public static void Test()
{
System.Text.Encoding utf8 = System.Text.Encoding.UTF8; // 扩展方法测试
string keyExt = "abcdefghijklmnopqrstuvwx";
string ivExt = "";
string dataExt = "吴@#@\0\n"; // CBC 模式
string tmpEnCBC = Des3Tool.Des3EncodeCBC(keyExt, ivExt, dataExt); // 返回 base64
string tmpDeCBC = Des3Tool.Des3DecodeCBC(keyExt, ivExt, tmpEnCBC); // 返回 utf8格式字符串 System.Console.WriteLine(tmpEnCBC);
System.Console.WriteLine(tmpDeCBC); System.Console.WriteLine(); // ECB 带 iv
string tmpEnECB = Des3Tool.Des3EncodeECB(keyExt, ivExt, dataExt); // 返回 base64
string tmpDeECB = Des3Tool.Des3DecodeECB(keyExt, ivExt, tmpEnECB); // 返回 utf8格式字符串 System.Console.WriteLine(tmpEnECB);
System.Console.WriteLine(tmpDeECB); System.Console.WriteLine(); // ECB 不带 iv
string tmpEnECBNoIv = Des3Tool.Des3EncodeECB(keyExt, dataExt); // 返回 base64
string tmpDeECBNoIv = Des3Tool.Des3DecodeECB(keyExt, tmpEnECBNoIv); // 返回 utf8格式字符串 System.Console.WriteLine(tmpEnECBNoIv);
System.Console.WriteLine(tmpDeECBNoIv); System.Console.WriteLine(); //key为abcdefghijklmnopqrstuvwx的Base64编码
byte[] key = Convert.FromBase64String("YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4");
byte[] iv = new byte[] { , , , , , , , }; //当模式为ECB时,IV无用
byte[] data = utf8.GetBytes("中国ABCabc123"); System.Console.WriteLine("ECB模式:");
byte[] str1 = Des3Tool.Des3EncodeECB(key, iv, data);
byte[] str2 = Des3Tool.Des3DecodeECB(key, iv, str1);
System.Console.WriteLine(Convert.ToBase64String(str1));
System.Console.WriteLine(System.Text.Encoding.UTF8.GetString(str2)); System.Console.WriteLine(); System.Console.WriteLine("CBC模式:");
byte[] str3 = Des3Tool.Des3EncodeCBC(key, iv, data);
byte[] str4 = Des3Tool.Des3DecodeCBC(key, iv, str3);
System.Console.WriteLine(Convert.ToBase64String(str3));
System.Console.WriteLine(utf8.GetString(str4)); System.Console.WriteLine(); } }
}

Java 代码

import java.security.Key;

import javax.crypto.Cipher;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.DESedeKeySpec;
import javax.crypto.spec.IvParameterSpec; import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder; public class Des3 {
public static void main(String[] args) throws Exception { byte[] key=new BASE64Decoder().decodeBuffer("YWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4");
byte[] keyiv = { 1, 2, 3, 4, 5, 6, 7, 8 }; byte[] data="中国ABCabc123".getBytes("UTF-8"); System.out.println("ECB加密解密");
byte[] str3 = des3EncodeECB(key,data );
byte[] str4 = ees3DecodeECB(key, str3);
System.out.println(new BASE64Encoder().encode(str3));
System.out.println(new String(str4, "UTF-8")); System.out.println(); System.out.println("CBC加密解密");
byte[] str5 = des3EncodeCBC(key, keyiv, data);
byte[] str6 = des3DecodeCBC(key, keyiv, str5);
System.out.println(new BASE64Encoder().encode(str5));
System.out.println(new String(str6, "UTF-8")); } /**
* ECB加密,不要IV
* @param key 密钥
* @param data 明文
* @return Base64编码的密文
* @throws Exception
*/
public static byte[] des3EncodeECB(byte[] key, byte[] data)
throws Exception { Key deskey = null;
DESedeKeySpec spec = new DESedeKeySpec(key);
SecretKeyFactory keyfactory = SecretKeyFactory.getInstance("desede");
deskey = keyfactory.generateSecret(spec); Cipher cipher = Cipher.getInstance("desede" + "/ECB/PKCS5Padding"); cipher.init(Cipher.ENCRYPT_MODE, deskey);
byte[] bOut = cipher.doFinal(data); return bOut;
} /**
* ECB解密,不要IV
* @param key 密钥
* @param data Base64编码的密文
* @return 明文
* @throws Exception
*/
public static byte[] ees3DecodeECB(byte[] key, byte[] data)
throws Exception { Key deskey = null;
DESedeKeySpec spec = new DESedeKeySpec(key);
SecretKeyFactory keyfactory = SecretKeyFactory.getInstance("desede");
deskey = keyfactory.generateSecret(spec); Cipher cipher = Cipher.getInstance("desede" + "/ECB/PKCS5Padding"); cipher.init(Cipher.DECRYPT_MODE, deskey); byte[] bOut = cipher.doFinal(data); return bOut; } /**
* CBC加密
* @param key 密钥
* @param keyiv IV
* @param data 明文
* @return Base64编码的密文
* @throws Exception
*/
public static byte[] des3EncodeCBC(byte[] key, byte[] keyiv, byte[] data)
throws Exception { Key deskey = null;
DESedeKeySpec spec = new DESedeKeySpec(key);
SecretKeyFactory keyfactory = SecretKeyFactory.getInstance("desede");
deskey = keyfactory.generateSecret(spec); Cipher cipher = Cipher.getInstance("desede" + "/CBC/PKCS5Padding");
IvParameterSpec ips = new IvParameterSpec(keyiv);
cipher.init(Cipher.ENCRYPT_MODE, deskey, ips);
byte[] bOut = cipher.doFinal(data); return bOut;
} /**
* CBC解密
* @param key 密钥
* @param keyiv IV
* @param data Base64编码的密文
* @return 明文
* @throws Exception
*/
public static byte[] des3DecodeCBC(byte[] key, byte[] keyiv, byte[] data)
throws Exception { Key deskey = null;
DESedeKeySpec spec = new DESedeKeySpec(key);
SecretKeyFactory keyfactory = SecretKeyFactory.getInstance("desede");
deskey = keyfactory.generateSecret(spec); Cipher cipher = Cipher.getInstance("desede" + "/CBC/PKCS5Padding");
IvParameterSpec ips = new IvParameterSpec(keyiv); cipher.init(Cipher.DECRYPT_MODE, deskey, ips); byte[] bOut = cipher.doFinal(data); return bOut; } }

C# Java 3DES加密解密 扩展及修正\0 问题的更多相关文章

  1. 【推荐】JAVA基础◆浅谈3DES加密解密

    国内私募机构九鼎控股打造APP,来就送 20元现金领取地址:http://jdb.jiudingcapital.com/phone.html内部邀请码:C8E245J (不写邀请码,没有现金送)国内私 ...

  2. iOS 3DES加密解密(一行代码搞定)

    3DES(或称为Triple DES)是三重数据加密算法(TDEA,Triple Data Encryption Algorithm)块密码的通称.它相当于是对每个数据块应用三次DES加密算法.由于计 ...

  3. 简进祥==iOS 3DES加密解密

    3DES(或称为Triple DES)是三重数据加密算法(TDEA,Triple Data Encryption Algorithm)块密码的通称.它相当于是对每个数据块应用三次DES加密算法.由于计 ...

  4. 你真的了解字典(Dictionary)吗? C# Memory Cache 踩坑记录 .net 泛型 结构化CSS设计思维 WinForm POST上传与后台接收 高效实用的.NET开源项目 .net 笔试面试总结(3) .net 笔试面试总结(2) 依赖注入 C# RSA 加密 C#与Java AES 加密解密

    你真的了解字典(Dictionary)吗?   从一道亲身经历的面试题说起 半年前,我参加我现在所在公司的面试,面试官给了一道题,说有一个Y形的链表,知道起始节点,找出交叉节点.为了便于描述,我把上面 ...

  5. 3DES加密解密

    C#3DES加密解密,JAVA.PHP可用 using System; using System.Security.Cryptography; using System.Text; namespace ...

  6. C# 实现 JAVA AES加密解密[原创]

    以下是网上普遍能收到的JAVA AES加密解密方法. 因为里面用到了KeyGenerator 和 SecureRandom,但是.NET 里面没有这2个类.无法使用安全随机数生成KEY. 我们在接收J ...

  7. C#与Java同步加密解密DES算法

    在实际项目中,往往前端和后端使用不同的语言.比如使用C#开发客户端,使用Java开发服务器端.有时出于安全性考虑需要将字符加密传输后,由服务器解密获取.本文介绍一种采用DES算法的C#与Java同步加 ...

  8. 【转】 java RSA加密解密实现

    [转] java RSA加密解密实现 该工具类中用到了BASE64,需要借助第三方类库:javabase64-1.3.1.jar 下载地址:http://download.csdn.net/detai ...

  9. java字符串加密解密

    java字符串加密解密 字符串加密解密的方式很多,每一种加密有着相对的解密方法.下面要说的是java中模拟php的pack和unpack的字符串加密解密方法. java模拟php中pack: /** ...

随机推荐

  1. CF478 B. Random Teams 组合数学 简单题

    n participants of the competition were split into m teams in some manner so that each team has at le ...

  2. Jetty和Tomcat的使用及性能测试

    一 测试目的 这次对Jetty和Tomcat进行性能测试,主要是为了给新版本WebPortal的开发选择合适的Java Web Server. 我们之前对老的Rest和新的TMMI都进行过性能测试,R ...

  3. ios8消息快捷处理——暂无输入框

    if (isiOS8) { //ios8的远程推送注册 NSSet *set = nil; #if 1 //1.创建消息上面要添加的动作(按钮的形式显示出来) UIMutableUserNotific ...

  4. 《一课经济学》书摘笔记I

    人在经济活动中追求私利的天性,以及天生短视的倾向(即总是只关注某项政策的即时影响,或者只关注政策对某个特殊群体产生的影响,而不去探究那项政策对所有群体造成的长远影响)以上种种致使经济规律的研究复杂艰难 ...

  5. 你可能不知道的 30 个 Python 语言的特点技巧

        列表按难度排序,常用的语言特征和技巧放在前面. 1.1   分拆 >>> a, b, c = 1, 2, 3>>> a, b, c(1, 2, 3)> ...

  6. POJ 1149 PIGS 【网络流】

    题意: m n   //有m个猪圈,n个人卖猪. a1...am    //编号为i的猪圈里有ai头猪. b1 c1...cb1 d1   //第i个人有bi把钥匙,分别是ci猪圈的,其它猪圈里的猪都 ...

  7. (easy)LeetCode 202.Happy Number

    Write an algorithm to determine if a number is "happy". A happy number is a number defined ...

  8. cctype函数 (字符类型判断)

    这些函数都在cctype头文件定义 isalnum(c)  如果C是字母或数字,则为TRUE isalpha(c)  如果C是字母,返回TRUE iscntrl(c) 如果C是控制字符,返回TRUE ...

  9. IIS错误代码表

    当用户试图通过 HTTP 或文件传输协议 (FTP) 访问一台正在运行 Internet 信息服务 (IIS) 的服务器上的内容时,IIS 返回一个表示该请求的状态的数字代码.该状态代码记录在 IIS ...

  10. HDU 4407 Sum 容斥原理

    Sum Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Problem Desc ...