using System;
using System.IO;
using System.Security.Cryptography;
using System.Text;
using System.Text.RegularExpressions;
namespace MacEncryptDeCrypt
{
public class MyStringSecurity
{
private const string EncryptKey = "99689955";
private static byte[] Keys = new byte[] { 0x11, 0x22, 0x33, 120, 0x90, 0xab, 0xcd, 0xef };
public static string DecryptDES(string decryptString)
{
try
{
byte[] bytes = Encoding.UTF8.GetBytes(EncryptKey);
byte[] keys = Keys;
byte[] buffer = Convert.FromBase64String(decryptString);
DESCryptoServiceProvider provider = new DESCryptoServiceProvider();
MemoryStream stream = new MemoryStream();
CryptoStream stream2 = new CryptoStream(stream, provider.CreateDecryptor(bytes, keys), CryptoStreamMode.Write);
stream2.Write(bu
08-20
358
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-22
294
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)