Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / clr / src / BCL / System / Security / Cryptography / RSAOAEPKeyExchangeDeformatter.cs / 1 / RSAOAEPKeyExchangeDeformatter.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== namespace System.Security.Cryptography { [System.Runtime.InteropServices.ComVisible(true)] public class RSAOAEPKeyExchangeDeformatter : AsymmetricKeyExchangeDeformatter { private RSA _rsaKey; // RSA Key value to do decrypt operation // // public constructors // public RSAOAEPKeyExchangeDeformatter() {} public RSAOAEPKeyExchangeDeformatter(AsymmetricAlgorithm key) { if (key == null) throw new ArgumentNullException("key"); _rsaKey = (RSA) key; } // // public properties // public override String Parameters { get { return null; } set { ; } } // // public methods // public override byte[] DecryptKeyExchange(byte[] rgbData) { if (_rsaKey == null) throw new CryptographicUnexpectedOperationException(Environment.GetResourceString("Cryptography_MissingKey")); if (_rsaKey is RSACryptoServiceProvider) { return ((RSACryptoServiceProvider) _rsaKey).Decrypt(rgbData, true); } else { return Utils.RsaOaepDecrypt(_rsaKey, SHA1.Create(), new PKCS1MaskGenerationMethod(), rgbData); } } public override void SetKey(AsymmetricAlgorithm key) { if (key == null) throw new ArgumentNullException("key"); _rsaKey = (RSA) key; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XmlSchemaImporter.cs
- ControlPaint.cs
- WebRequestModuleElement.cs
- DeliveryStrategy.cs
- ProviderCollection.cs
- PointCollection.cs
- ParsedAttributeCollection.cs
- WindowsListBox.cs
- XXXInfos.cs
- Int32AnimationBase.cs
- WebPartVerbsEventArgs.cs
- HttpSessionStateBase.cs
- DoubleAnimationUsingPath.cs
- ColumnMapCopier.cs
- Simplifier.cs
- DataGridViewRowsAddedEventArgs.cs
- ServerReliableChannelBinder.cs
- GeneralTransform3DGroup.cs
- ArgumentException.cs
- Random.cs
- X509Utils.cs
- PerspectiveCamera.cs
- SystemTcpConnection.cs
- LabelEditEvent.cs
- InvalidAsynchronousStateException.cs
- COM2ComponentEditor.cs
- FlowDocumentReaderAutomationPeer.cs
- SqlWebEventProvider.cs
- Exceptions.cs
- WebMessageBodyStyleHelper.cs
- PropertyMapper.cs
- _ListenerAsyncResult.cs
- Root.cs
- HttpException.cs
- QueryResults.cs
- SqlInternalConnectionSmi.cs
- ToolStripDropDownDesigner.cs
- DetailsViewDeletedEventArgs.cs
- OdbcConnectionHandle.cs
- File.cs
- HwndMouseInputProvider.cs
- BitmapEffectDrawing.cs
- MenuBindingsEditorForm.cs
- CssTextWriter.cs
- PasswordPropertyTextAttribute.cs
- TextTreePropertyUndoUnit.cs
- Label.cs
- SqlConnectionHelper.cs
- SizeLimitedCache.cs
- ContextInformation.cs
- SliderAutomationPeer.cs
- ControlSerializer.cs
- AssociationSet.cs
- OpCodes.cs
- GradientStop.cs
- IPipelineRuntime.cs
- DeleteStoreRequest.cs
- MouseWheelEventArgs.cs
- TextBoxAutoCompleteSourceConverter.cs
- StaticDataManager.cs
- OverrideMode.cs
- IgnoreSection.cs
- DesignerView.cs
- ScriptingSectionGroup.cs
- GeometryModel3D.cs
- GlyphRunDrawing.cs
- DescriptionAttribute.cs
- LayoutDump.cs
- UnsafeNativeMethods.cs
- ClientConvert.cs
- LicenseProviderAttribute.cs
- ErrorRuntimeConfig.cs
- ProfilePropertyNameValidator.cs
- DataColumnPropertyDescriptor.cs
- InstanceHandleReference.cs
- IntegerValidatorAttribute.cs
- Publisher.cs
- InvalidCastException.cs
- CollectionViewProxy.cs
- UniqueConstraint.cs
- CodeTypeDelegate.cs
- SqlInfoMessageEvent.cs
- WsdlParser.cs
- InvalidateEvent.cs
- _AutoWebProxyScriptWrapper.cs
- DefaultObjectSerializer.cs
- Unit.cs
- GeneratedView.cs
- RegexStringValidator.cs
- CfgParser.cs
- SwitchLevelAttribute.cs
- AvTraceDetails.cs
- Math.cs
- UnsafeNativeMethods.cs
- RuleRefElement.cs
- ZipIOCentralDirectoryFileHeader.cs
- DSACryptoServiceProvider.cs
- ControlUtil.cs
- FontWeightConverter.cs
- ExtensionDataObject.cs