Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Security / Cryptography / RSAOAEPKeyExchangeDeformatter.cs / 1305376 / RSAOAEPKeyExchangeDeformatter.cs
using System.Diagnostics.Contracts; // ==++== // // 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"); Contract.EndContractBlock(); _rsaKey = (RSA) key; } // // public properties // public override String Parameters { get { return null; } set { ; } } // // public methods // [System.Security.SecuritySafeCritical] // auto-generated 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"); Contract.EndContractBlock(); _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
- CaseKeyBox.xaml.cs
- EvidenceTypeDescriptor.cs
- XsdBuildProvider.cs
- ColorContextHelper.cs
- RenameRuleObjectDialog.cs
- WindowsListViewGroupSubsetLink.cs
- xmlsaver.cs
- PointCollection.cs
- ClonableStack.cs
- DecimalConstantAttribute.cs
- SafeLibraryHandle.cs
- ReflectionTypeLoadException.cs
- WindowsFont.cs
- DataSourceSelectArguments.cs
- MsmqDecodeHelper.cs
- ByteStorage.cs
- PasswordDeriveBytes.cs
- SqlConnectionString.cs
- RenderCapability.cs
- CodeTypeMember.cs
- MobileTextWriter.cs
- ArithmeticException.cs
- MethodBuilderInstantiation.cs
- TreeNodeCollectionEditor.cs
- ExecutedRoutedEventArgs.cs
- AgileSafeNativeMemoryHandle.cs
- XPathDocument.cs
- Module.cs
- ScaleTransform3D.cs
- DeferredReference.cs
- ImageDrawing.cs
- EntityStoreSchemaFilterEntry.cs
- EntityDataSourceDataSelectionPanel.cs
- ControlsConfig.cs
- COM2ComponentEditor.cs
- WindowsListViewGroup.cs
- HttpRequest.cs
- VisualBrush.cs
- ExpressionsCollectionEditor.cs
- ListView.cs
- BlurEffect.cs
- HandledEventArgs.cs
- BasicExpressionVisitor.cs
- TextSpanModifier.cs
- SequentialActivityDesigner.cs
- Publisher.cs
- ProcessModule.cs
- ChtmlTextWriter.cs
- MissingSatelliteAssemblyException.cs
- MergeFailedEvent.cs
- DataGridViewCellValidatingEventArgs.cs
- FieldDescriptor.cs
- WebPartVerbsEventArgs.cs
- CultureInfoConverter.cs
- ErrorWebPart.cs
- Axis.cs
- PropertyGridEditorPart.cs
- Pointer.cs
- NativeMethods.cs
- Point3DCollectionValueSerializer.cs
- ObservableCollectionDefaultValueFactory.cs
- InternalResources.cs
- FormattedText.cs
- GeneratedContractType.cs
- DataSet.cs
- x509utils.cs
- HebrewCalendar.cs
- TextUtf8RawTextWriter.cs
- ContextProperty.cs
- XmlnsDictionary.cs
- StorageEntityContainerMapping.cs
- BaseParagraph.cs
- safesecurityhelperavalon.cs
- FormsAuthenticationEventArgs.cs
- TransformProviderWrapper.cs
- RecordsAffectedEventArgs.cs
- XmlIgnoreAttribute.cs
- PersonalizationProviderHelper.cs
- ResizeGrip.cs
- LocalsItemDescription.cs
- Stream.cs
- PeerTransportCredentialType.cs
- Model3DGroup.cs
- EdmItemCollection.cs
- VirtualPathProvider.cs
- Window.cs
- PermissionToken.cs
- XmlStreamedByteStreamReader.cs
- CompositeTypefaceMetrics.cs
- ScriptReferenceEventArgs.cs
- ColumnMapVisitor.cs
- TransformationRules.cs
- DropShadowEffect.cs
- ModuleElement.cs
- IResourceProvider.cs
- SiteMapDataSource.cs
- Psha1DerivedKeyGenerator.cs
- BufferModeSettings.cs
- FormViewDesigner.cs
- WebBaseEventKeyComparer.cs