[bcl] Add CommonCrypto to corlib, Mono.Security and System.Core.
[mono.git] / mcs / class / corlib / CommonCrypto / CorlibExtras.cs
1 //
2 // CorlibExtras.cs: additional stuff not provided by autogenerated code
3 //
4 // Authors:
5 //      Sebastien Pouliot (sebastien@xamarun.com)
6 //
7 // Copyright (C) 2012 Xamarin Inc. All rights reserved.
8 //
9
10 namespace System.Security.Cryptography {
11         
12         // required to ensure compatibility with MS implementation
13         public sealed partial class RC2CryptoServiceProvider : RC2 {
14                 
15                 public override int EffectiveKeySize {
16                         get { return base.EffectiveKeySize; }
17                         set {
18                                 if (value != KeySizeValue)
19                                         throw new CryptographicUnexpectedOperationException ("Effective key size must match key size for compatibility");
20                                 base.EffectiveKeySize = value; 
21                         }
22                 }
23         }
24 }