2004-02-07 Tim Coleman <tim@timcoleman.com>
[mono.git] / mcs / class / System.Security / System.Security.Cryptography.Xml / EncryptedReference.cs
1 //
2 // EncryptedReference.cs - EncryptedReference implementation for XML Encryption
3 // http://www.w3.org/2001/04/xmlenc#sec-EncryptedReference
4 //
5 // Author:
6 //      Tim Coleman (tim@timcoleman.com)
7 //
8 // Copyright (C) Tim Coleman, 2004
9
10 #if NET_1_2
11
12 using System.Xml;
13
14 namespace System.Security.Cryptography.Xml {
15         public abstract class EncryptedReference {
16
17                 #region Fields
18
19                 bool cacheValid;
20                 string referenceType;
21                 string uri;
22                 TransformChain tc;
23
24                 #endregion // Fields
25
26                 #region Constructors
27
28                 protected EncryptedReference ()
29                 {
30                         uri = null;
31                         TransformChain = new TransformChain ();
32                 }
33         
34                 protected EncryptedReference (string uri)
35                 {
36                         Uri = uri;
37                         TransformChain = new TransformChain ();
38                 }
39         
40                 protected EncryptedReference (string uri, TransformChain tc)
41                         : this ()
42                 {
43                         Uri = uri;
44                         TransformChain = tc;
45                 }
46         
47                 #endregion // Constructors
48
49                 #region Properties
50
51                 [MonoTODO()]
52                 protected internal bool CacheValid {
53                         get { return cacheValid; }
54                 }
55
56                 [MonoTODO]
57                 protected string ReferenceType {
58                         get { return referenceType; }
59                 }
60
61                 public TransformChain TransformChain {
62                         get { return tc; }
63                         set { tc = value; }
64                 }
65
66                 public string Uri {
67                         get { return uri; }
68                         set { uri = value; }
69                 }
70
71                 #endregion // Properties
72         
73                 #region Methods
74
75                 public void AddTransform (Transform transform)
76                 {
77                         TransformChain.Add (transform);
78                 }
79
80                 public virtual XmlElement GetXml ()
81                 {
82                         return GetXml (new XmlDocument ());
83                 }
84
85                 internal virtual XmlElement GetXml (XmlDocument document)
86                 {
87                         return document.CreateElement ("", "");
88                 }
89
90                 public virtual void LoadXml (XmlElement value)
91                 {
92                 }
93
94                 #endregion // Methods
95         }
96 }
97
98 #endif