一个离开.NET的程序员

ryhan

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2012年8月28日

摘要: 项目中用到,此处记下: 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Web; 5 using System.IO; 6 using System.Security.Cryptography; 7 using System.Text; 8 9 namespace CrossSiteLogin.Common 10 { 11 public class AESEncryptHelper 12 { 13 /// <summ... 阅读全文
posted @ 2012-08-28 17:21 ryhan 阅读(3127) 评论(0) 推荐(0) 编辑

摘要: java加解密: 1 public class Encrypt 2 { 3 public Encrypt() 4 { 5 } 6 public static String eCode(String needEncrypt) throws Exception 7 { 8 byte result[] = null; 9 try10 {11 Cipher enCipher = Cipher.getInstance("DES");12 javax.crypto.Se... 阅读全文
posted @ 2012-08-28 16:14 ryhan 阅读(604) 评论(0) 推荐(0) 编辑

摘要: 原:http://xylw.iteye.com/blog/1121714首先,引入 using System.Security.Cryptography; 1 /// <summary> 2 /// AES、DES加解密工具类 3 /// </summary> 4 public class EncryptUtil 5 { 6 private static readonly string AESKEY = "GHYU80DV3465QSFG";//16或者32位 7 8 //... 阅读全文
posted @ 2012-08-28 16:10 ryhan 阅读(1604) 评论(0) 推荐(0) 编辑