diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util/Security/DESEncrypt.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util/Security/DESEncrypt.cs
index f34b8dfa2..0c5b61091 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util/Security/DESEncrypt.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Util/Learun.Util/Security/DESEncrypt.cs
@@ -33,8 +33,8 @@ namespace Learun.Util
///
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
///
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);