最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
C#一个封装的加密解密类
时间:2022-07-02 11:10:51 编辑:袖梨 来源:一聚教程网
using System;
using System.Text;
using System.Globalization;
using System.Security.Cryptography;
using System.Windows.Forms;
namespace Jh.Encrypts
{
public class JhEncrypt
{
///
/// 构造方法
///
public JhEncrypt()
{
}
///
/// 使用缺省密钥字符串加密
///
/// 明文
///密文
public static string Encrypt(string original)
{
return Encrypt(original,"JASONHEUNG");
}
///
/// 使用缺省密钥解密
///
/// 密文
///明文
public static string Decrypt(string original)
{
return Decrypt(original,"JASONHEUNG",System.Text.Encoding.Default);
}
///
/// 使用给定密钥解密
///
/// 密文
/// 密钥
///明文
public static string Decrypt(string original, string key)
{
return Decrypt(original,key,System.Text.Encoding.Default);
}
///
/// 使用缺省密钥解密,返回指定编码方式明文
///
/// 密文
using System.Text;
using System.Globalization;
using System.Security.Cryptography;
using System.Windows.Forms;
namespace Jh.Encrypts
{
public class JhEncrypt
{
///
/// 构造方法
///
public JhEncrypt()
{
}
///
/// 使用缺省密钥字符串加密
///
/// 明文
///
public static string Encrypt(string original)
{
return Encrypt(original,"JASONHEUNG");
}
///
/// 使用缺省密钥解密
///
/// 密文
///
public static string Decrypt(string original)
{
return Decrypt(original,"JASONHEUNG",System.Text.Encoding.Default);
}
///
/// 使用给定密钥解密
///
/// 密文
/// 密钥
///
public static string Decrypt(string original, string key)
{
return Decrypt(original,key,System.Text.Encoding.Default);
}
///
/// 使用缺省密钥解密,返回指定编码方式明文
///
/// 密文
相关文章
- 比特币历史最高价 05-02
- TRON是什么币 05-02
- 2025年比特币走势 05-02
- Binance.US已上线VIRTUAL 04-30
- binance官网电脑下载_binance苹果版下载地址V2.57.7 04-30
- 比特币交易量最大的交易所是哪个?全球最大的比特币交易平台排名 04-30