C#加密代码:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using javax.crypto;
using System.Security.Cryptography;
using java.security;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
String key = "haha";
byte[] a = Convert.FromBase64String("BP8SBhkYNn/YRQo5V7PSmg==");
string result = DeAES(a, key);
Console.WriteLine(result);
byte[] b = System.Text.Encoding.Default.GetBytes("admin_123");
string result2 = EnAES(b, key);
Console.WriteLine(result2);
Console.Read();
}
public static string DeAES(byte[] content, string key)
{
KeyGenerator kgen = KeyGenerator.getInstance("AES");
SecureRandom secureRandom = SecureRandom.getInstan