XmlDsigEnvelopedSignatureTransform.cs 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. //
  2. // XmlDsigEnvelopedSignatureTransform.cs -
  3. // Enveloped Signature Transform implementation for XML Signature
  4. //
  5. // Author:
  6. // Sebastien Pouliot ([email protected])
  7. //
  8. // (C) 2002, 2003 Motus Technologies Inc. (http://www.motus.com)
  9. //
  10. using System.IO;
  11. using System.Xml;
  12. namespace System.Security.Cryptography.Xml {
  13. [MonoTODO]
  14. public class XmlDsigEnvelopedSignatureTransform : Transform {
  15. private Type[] input;
  16. private Type[] output;
  17. private bool comments;
  18. public XmlDsigEnvelopedSignatureTransform ()
  19. {
  20. comments = false;
  21. }
  22. public XmlDsigEnvelopedSignatureTransform (bool includeComments)
  23. {
  24. comments = includeComments;
  25. }
  26. public override Type[] InputTypes {
  27. get {
  28. if (input == null) {
  29. lock (this) {
  30. // this way the result is cached if called multiple time
  31. input = new Type [3];
  32. input[0] = typeof (System.IO.Stream);
  33. input[1] = typeof (System.Xml.XmlDocument);
  34. input[2] = typeof (System.Xml.XmlNodeList);
  35. }
  36. }
  37. return input;
  38. }
  39. }
  40. public override Type[] OutputTypes {
  41. get {
  42. if (output == null) {
  43. lock (this) {
  44. // this way the result is cached if called multiple time
  45. output = new Type [2];
  46. input[0] = typeof (System.Xml.XmlDocument);
  47. input[1] = typeof (System.Xml.XmlNodeList);
  48. }
  49. }
  50. return output;
  51. }
  52. }
  53. protected override XmlNodeList GetInnerXml ()
  54. {
  55. return null; // THIS IS DOCUMENTED AS SUCH
  56. }
  57. [MonoTODO()]
  58. public override object GetOutput()
  59. {
  60. // return (object) new XmlNodeList ();
  61. return null;
  62. }
  63. public override object GetOutput (Type type)
  64. {
  65. if (type == Type.GetType ("Stream"))
  66. return GetOutput ();
  67. throw new ArgumentException ("type");
  68. }
  69. public override void LoadInnerXml (XmlNodeList nodeList)
  70. {
  71. // NO CHANGE
  72. }
  73. [MonoTODO()]
  74. public override void LoadInput (object obj)
  75. {
  76. // if (type.Equals (Stream.GetType ())
  77. }
  78. }
  79. }