SecurityConstants.cs 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using System;
  2. namespace Top.Api.Security
  3. {
  4. public class SecurityConstants
  5. {
  6. public const long DEFAULT_INTERVAL = 300;// 5分钟
  7. public const long DEFAULT_MAX_INTERVAL = 600;// 10分钟
  8. public const string PUBLISH_STATUS = "publish_status";// 发布状态
  9. public const string BETA_STATUS = "0";// BETA发布
  10. public const string CURRENT = "current_";
  11. public const string PREVIOUS = "previous_";
  12. public const string CURRENT_PHONE_ENCRYPT_TYPE = "current_phone";// 当前手机加密类型(1:普通加密,2:检索加密)
  13. public const string PREVIOUS_PHONE_ENCRYPT_TYPE = "previous_phone";// 上个版本手机加密类型(1:普通加密,2:检索加密)
  14. public const string CURRENT_NICK_ENCRYPT_TYPE = "current_nick";// 当前nick加密类型(1:普通加密,2:检索加密)
  15. public const string PREVIOUS_NICK_ENCRYPT_TYPE = "previous_nick";// 上个版本nick加密类型(1:普通加密,2:检索加密)
  16. public const string CURRENT_RECEIVER_NAME_ENCRYPT_TYPE = "current_receiver_name";// 当前收货人加密类型(1:普通加密,2:检索加密)
  17. public const string PREVIOUS_RECEIVER_NAME_ENCRYPT_TYPE = "previous_receiver_name";// 上个版本收货人加密类型(1:普通加密,2:检索加密)
  18. public const string NORMAL_ENCRYPT_TYPE = "1";
  19. public const string INDEX_ENCRYPT_TYPE = "2";
  20. public const string ENCRYPT_INDEX_COMPRESS_LEN = "encrypt_index_compress_len";// 密文滑窗压缩长度
  21. public const string ENCRYPT_SLIDE_SIZE = "encrypt_slide_size";// 滑动窗口大小
  22. public const int DEFAULT_ENCRYPT_SLIDE_SIZE = 4;
  23. public const int DEFAULT_INDEX_ENCRYPT_COMPRESS_LEN = 3;
  24. public const string RECEIVER_NAME = "receiver_name";// 收货人
  25. public const string NICK = "nick";// 买家nick
  26. public const string PHONE = "phone";// 手机号码
  27. public const string NORMAL = "normal";
  28. public const string SIMPLE = "simple";// 普通模式,不带检索功能
  29. public const string SEARCH = "search";// 带检索功能
  30. public const char SIMPLE_CHAR = '~';
  31. public const char NICK_SEPARATOR_CHAR = SIMPLE_CHAR;
  32. public static string NICK_SEPARATOR = Convert.ToString(SIMPLE_CHAR);
  33. public const char PHONE_SEPARATOR_CHAR = '$';
  34. public static string PHONE_SEPARATOR = Convert.ToString(PHONE_SEPARATOR_CHAR);
  35. public const char NORMAL_SEPARATOR_CHAR = (char)0x01;
  36. public static string NORMAL_SEPARATOR = Convert.ToString(NORMAL_SEPARATOR_CHAR);
  37. public static string SIMPLE_SEPARATOR = Convert.ToString(SIMPLE_CHAR);
  38. public const string UNDERLINE = "_";
  39. }
  40. }