MachineKeyConfig.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. //
  2. // System.Web.Configuration.MachineKeyConfig
  3. //
  4. // Authors:
  5. // Gonzalo Paniagua Javier ([email protected])
  6. //
  7. // (C) 2002 Ximian, Inc (http://www.ximian.com)
  8. //
  9. using System;
  10. using System.Collections;
  11. using System.Configuration;
  12. using System.Xml;
  13. namespace System.Web.Configuration
  14. {
  15. class MachineKeyConfig
  16. {
  17. static MachineKeyConfig machineKey;
  18. byte [] validationKey;
  19. byte [] decryptionKey;
  20. string validationType;
  21. internal MachineKeyConfig (object parent)
  22. {
  23. if (parent is MachineKeyConfig) {
  24. MachineKeyConfig p = (MachineKeyConfig) parent;
  25. validationKey = p.validationKey;
  26. decryptionKey = p.decryptionKey;
  27. validationType = p.validationType;
  28. }
  29. }
  30. internal byte [] ValidationKey {
  31. get { return validationKey; }
  32. set { validationKey = value; }
  33. }
  34. internal byte [] DecryptionKey {
  35. get { return decryptionKey; }
  36. set { decryptionKey = value; }
  37. }
  38. internal string ValidationType {
  39. get {
  40. if (validationType == null)
  41. validationType = "SHA1";
  42. return validationType;
  43. }
  44. set {
  45. if (value == null)
  46. return;
  47. validationType = value;
  48. }
  49. }
  50. internal static MachineKeyConfig MachineKey {
  51. get { return machineKey; }
  52. set { machineKey = value; }
  53. }
  54. }
  55. }