SysSecurityCore.cs 816 B

123456789101112131415161718192021222324252627282930313233
  1. using System;
  2. using WMS.Util;
  3. namespace WMS.Core
  4. {
  5. public class SysSecurityCore
  6. {
  7. const string AES256IV = "C686096CDBB34A77";
  8. const string AES256Key = "C628CE01C4F84037BEA124C90B3EE1FC";
  9. public static string Aes256Encrypt(string EncryptText)
  10. {
  11. try
  12. {
  13. return SecurityUtil.AesEncrypt(EncryptText, AES256Key, AES256IV);
  14. }
  15. catch (Exception ex)
  16. {
  17. throw ex;
  18. }
  19. }
  20. public static string Aes256Decrypt(string DecryptText)
  21. {
  22. try
  23. {
  24. return SecurityUtil.AesDecrypt(DecryptText, AES256Key, AES256IV);
  25. }
  26. catch (Exception ex)
  27. {
  28. throw ex;
  29. }
  30. }
  31. }
  32. }