New tests.
[mono.git] / mcs / class / System.Core / System.Security.Cryptography / Aes.cs
index e35e6ddd8909e948514c20f958ac28e3030c91f5..eaee476a5005b273ce30f724f51c3036ed336663 100644 (file)
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
+
+// Since 4.0 (both FX and SL) this type is defined in mscorlib - before 4.0 it was in System.Core.dll
+#if (INSIDE_CORLIB && (NET_4_0 || BOOTSTRAP_NET_4_0 || MOONLIGHT)) || (!INSIDE_CORLIB && !NET_4_0 && !BOOTSTRAP_NET_4_0 && !MOONLIGHT)
 \r
+using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
 \r
 namespace System.Security.Cryptography {\r
@@ -37,9 +41,19 @@ namespace System.Security.Cryptography {
        // References:
        // a.   FIPS PUB 197: Advanced Encryption Standard
        //      http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf
-\r
+
+#if INSIDE_CORLIB
+       // since 4.0 (both FX and SL) this type now resides inside mscorlib.dll and link back to System.Core.dll\r
+       #if MOONLIGHT
+       // version has not changed between SL3 (System.Core) and SL4
+       [TypeForwardedFrom (Consts.AssemblySystem_Core)]
+       #elif NET_4_0 || BOOTSTRAP_NET_4_0
+       // use 3.5 version
+       [TypeForwardedFrom ("System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
+       #endif
+#endif
        public abstract class Aes : SymmetricAlgorithm {\r
-\r
+
                public static new Aes Create () \r
                {\r
                        return Create ("System.Security.Cryptography.AesManaged, " + Consts.AssemblySystem_Core);\r
@@ -66,3 +80,5 @@ namespace System.Security.Cryptography {
                }\r
        }\r
 }\r
+#endif
+