XmlDsigEnvelopedSignatureTransform.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. Algorithm = "http://www.w3.org/2000/09/xmldsig#enveloped-signature";
  21. comments = false;
  22. }
  23. public XmlDsigEnvelopedSignatureTransform (bool includeComments)
  24. {
  25. comments = includeComments;
  26. }
  27. public override Type[] InputTypes {
  28. get {
  29. if (input == null) {
  30. lock (this) {
  31. // this way the result is cached if called multiple time
  32. input = new Type [3];
  33. input[0] = typeof (System.IO.Stream);
  34. input[1] = typeof (System.Xml.XmlDocument);
  35. input[2] = typeof (System.Xml.XmlNodeList);
  36. }
  37. }
  38. return input;
  39. }
  40. }
  41. public override Type[] OutputTypes {
  42. get {
  43. if (output == null) {
  44. lock (this) {
  45. // this way the result is cached if called multiple time
  46. output = new Type [2];
  47. input[0] = typeof (System.Xml.XmlDocument);
  48. input[1] = typeof (System.Xml.XmlNodeList);
  49. }
  50. }
  51. return output;
  52. }
  53. }
  54. protected override XmlNodeList GetInnerXml ()
  55. {
  56. return null; // THIS IS DOCUMENTED AS SUCH
  57. }
  58. [MonoTODO()]
  59. public override object GetOutput()
  60. {
  61. // return (object) new XmlNodeList ();
  62. return null;
  63. }
  64. public override object GetOutput (Type type)
  65. {
  66. if (type == Type.GetType ("Stream"))
  67. return GetOutput ();
  68. throw new ArgumentException ("type");
  69. }
  70. public override void LoadInnerXml (XmlNodeList nodeList)
  71. {
  72. // NO CHANGE
  73. }
  74. [MonoTODO()]
  75. public override void LoadInput (object obj)
  76. {
  77. // if (type.Equals (Stream.GetType ())
  78. }
  79. }
  80. }