Yuebon.NetCore/Yuebon.Commons/Encrypt/EncodeHelper.cs
(开头部分) 24KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/*******************************************************************************
* Copyright © 2017-2020 Yuebon.Framework 版权所有
* Author: Yuebon
* Description: Yuebon快速开发平台
* Website:http://www.yuebon.com
*********************************************************************************/
using System;
using System.Text;
using System.IO;
using System.Security.Cryptography;
namespace Yuebon.Commons.Encrypt
{
/// <summary>
/// DES对称加解密、AES RijndaelManaged加解密、Base64加密解密、MD5加密等操作辅助类
/// </summary>
public sealed class EncodeHelper
{
#region DES对称加密解密
/// <summary>
/// 注意DEFAULT_ENCRYPT_KEY的长度为8位(如果要增加或者减少key长度,调整IV的长度就是了)
/// </summary>
public const string DEFAULT_ENCRYPT_KEY = "12345678";
/// <summary>
/// 使用默认加密
/// </summary>
/// <param name="strText"></param>
/// <returns></returns>
public static string DesEncrypt(string strText)
{
try
{
return DesEncrypt(strText, DEFAULT_ENCRYPT_KEY);
}
catch
{
return "";
}
}
/// <summary>
/// 使用默认解密
/// </summary>
/// <param name="strText">解密字符串</param>
/// <returns></returns>
public static string DesDecrypt(string strText)
{
try
{
return DesDecrypt(strText, DEFAULT_ENCRYPT_KEY);
}
catch
{
return "";
}
}
/// <summary>
后面还有 565 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。