Initial commit
[mono.git] / mcs / class / referencesource / mscorlib / system / security / cryptography / derivebytes.cs
1 // ==++==
2 // 
3 //   Copyright (c) Microsoft Corporation.  All rights reserved.
4 // 
5 // ==--==
6 // <OWNER>[....]</OWNER>
7 // 
8
9 //
10 // DeriveBytes.cs
11 //
12
13 namespace System.Security.Cryptography {
14 [System.Runtime.InteropServices.ComVisible(true)]
15     public abstract class DeriveBytes
16     // On Orcas DeriveBytes is not disposable, so we cannot add the IDisposable implementation to the
17     // CoreCLR mscorlib.  However, this type does need to be disposable since subtypes can and do hold onto
18     // native resources. Therefore, on desktop mscorlibs we add an IDisposable implementation.
19 #if !FEATURE_CORECLR
20     : IDisposable
21 #endif // !FEATURE_CORECLR
22     {
23         //
24         // public methods
25         //
26
27         public abstract byte[] GetBytes(int cb);
28         public abstract void Reset();
29
30         public void Dispose() {
31             Dispose(true);
32             GC.SuppressFinalize(this);
33         }
34
35         protected virtual void Dispose(bool disposing) {
36             return;
37         }
38     }
39 }