| | |
| | | using System.Security.Cryptography; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEA_Core.Const; |
| | | using WIDESEA_Core.DB; |
| | | |
| | | namespace WIDESEA_Core.Helper |
| | | { |
| | |
| | | |
| | | public static string DecryptDES(this string decryptString, string decryptKey) |
| | | { |
| | | if (decryptKey == AppSecret.DB && !AppSettings.app(MainDb.ConnectionStringsEncryption).ObjToBool()) |
| | | return decryptString; |
| | | |
| | | byte[] rgbKey = Encoding.UTF8.GetBytes(decryptKey.Substring(0, 16)); |
| | | byte[] rgbIV = Keys; |
| | | byte[] inputByteArray = Convert.FromBase64String(decryptString.Replace('_', '+').Replace('~', '/')); |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | public static bool TryDecryptDES(this string decryptString, string decryptKey, out string result) |
| | | { |