//声明加密字符生成的随机数的位数
public const int length = 32; 【相关文章:这是2003年公司进行过程改进时的一篇讨】 【扩展阅读:JSP环境准备】 //声明加密字符前后的分隔长度 【扩展信息:这是2003年的另一篇讨论稿】 public const int len = 4;///方法作用:根据参数对其加密
///参数: /// string strencrypt;欲加密的字符 ///返回结果:加密后的字符 public static byte[] sourceencrypt(string strencrypt) { string source = encrypt(strencrypt); //first string first = encrypt(source.substring(0,len)); //second string second = encrypt(source.substring(len-1,source.length-len)); //third string third = encrypt(source.substring(source.length-len,len)); //four byte[] random = new byte[length]; rngcryptoserviceprovider rng = new rngcryptoserviceprovider(); rng.getnonzerobytes(random); string four = encrypt(system.text.encoding.ascii.getstring(random)); string all = first+second+third+four; return system.text.encoding.ascii.getbytes(all); } // end sourceencrypt ... 下一页