Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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; } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CodeArrayCreateExpression.cs
- ViewGenResults.cs
- SoapReflectionImporter.cs
- CollectionViewGroupRoot.cs
- SystemSounds.cs
- RotateTransform3D.cs
- WebCategoryAttribute.cs
- SqlServices.cs
- UndirectedGraph.cs
- GlobalItem.cs
- Parallel.cs
- FieldAccessException.cs
- ApplicationProxyInternal.cs
- TransformValueSerializer.cs
- NullableFloatAverageAggregationOperator.cs
- TransportBindingElement.cs
- HtmlInputPassword.cs
- WebPartMovingEventArgs.cs
- TextLineBreak.cs
- RadioButtonAutomationPeer.cs
- GetRecipientListRequest.cs
- DataGridViewCellParsingEventArgs.cs
- __Filters.cs
- X509CertificateChain.cs
- SqlPersonalizationProvider.cs
- TaskFileService.cs
- ListBox.cs
- MasterPageCodeDomTreeGenerator.cs
- StoragePropertyMapping.cs
- CurrencyWrapper.cs
- BulletedListEventArgs.cs
- SubpageParagraph.cs
- FileLevelControlBuilderAttribute.cs
- XmlSchemaInfo.cs
- ProfilePropertySettings.cs
- SettingsPropertyIsReadOnlyException.cs
- ColorConverter.cs
- ScriptRef.cs
- InvokeGenerator.cs
- ObservableCollection.cs
- CmsInterop.cs
- AssociationSetEnd.cs
- WebPartManagerDesigner.cs
- DisposableCollectionWrapper.cs
- WebPartActionVerb.cs
- SelectedDatesCollection.cs
- MarginCollapsingState.cs
- DbConnectionPoolGroupProviderInfo.cs
- PnrpPermission.cs
- BlobPersonalizationState.cs
- DataGridViewIntLinkedList.cs
- Win32.cs
- DataControlPagerLinkButton.cs
- OleDbRowUpdatingEvent.cs
- PrtCap_Base.cs
- XmlSchemaDocumentation.cs
- FragmentQueryKB.cs
- HtmlUtf8RawTextWriter.cs
- InvokeHandlers.cs
- XsdBuildProvider.cs
- StateDesigner.LayoutSelectionGlyph.cs
- TableLayoutSettings.cs
- StylesEditorDialog.cs
- DetailsViewDeleteEventArgs.cs
- SwitchCase.cs
- StringAttributeCollection.cs
- ADRoleFactoryConfiguration.cs
- UrlPath.cs
- SelectorItemAutomationPeer.cs
- EventBindingService.cs
- BitmapCodecInfoInternal.cs
- Divide.cs
- PassportAuthentication.cs
- UseManagedPresentationBindingElement.cs
- NotifyParentPropertyAttribute.cs
- BindingExpression.cs
- BamlResourceDeserializer.cs
- StateRuntime.cs
- PublishLicense.cs
- DiscoveryServerProtocol.cs
- ImportCatalogPart.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- XmlAttributeProperties.cs
- URIFormatException.cs
- ButtonBase.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- BoundPropertyEntry.cs
- TargetConverter.cs
- MediaSystem.cs
- WindowsListBox.cs
- Win32PrintDialog.cs
- ImageAutomationPeer.cs
- NavigationCommands.cs
- StrongNamePublicKeyBlob.cs
- ErrorWrapper.cs
- IisHelper.cs
- ExtendedProperty.cs
- CellCreator.cs
- IdentityReference.cs
- AnalyzedTree.cs