瀏覽代碼

【修改】加解密优化;

和田中职
dyy 3 月之前
父節點
當前提交
4485ee7572
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. +4
    -4
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util/Security/DESEncrypt.cs

+ 4
- 4
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util/Security/DESEncrypt.cs 查看文件

@@ -33,8 +33,8 @@ namespace Learun.Util
/// <returns></returns>
public static string Encrypt(string Text, string sKey, bool md5 = true)
{
var key = sKey;
var iv = sKey;
var key = sKey.Substring(0, 8);
var iv = sKey.Substring(0, 8);
if (md5)
{
key = Md5Helper.Hash(sKey).ToUpper().Substring(0, 8);
@@ -84,8 +84,8 @@ namespace Learun.Util
/// <returns></returns>
public static string Decrypt(string Text, string sKey, bool md5 = true)
{
var key = sKey;
var iv = sKey;
var key = sKey.Substring(0, 8);
var iv = sKey.Substring(0, 8);
if (md5)
{
key = Md5Helper.Hash(sKey).ToUpper().Substring(0, 8);


Loading…
取消
儲存