Browse Source

【修改】加解密优化;

和田中职
dyy 3 months ago
parent
commit
4485ee7572
1 changed files with 4 additions and 4 deletions
  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 View File

@@ -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…
Cancel
Save