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
- GcSettings.cs
- OAVariantLib.cs
- DatePickerDateValidationErrorEventArgs.cs
- DataPagerField.cs
- SystemDiagnosticsSection.cs
- ToolboxItemSnapLineBehavior.cs
- ProcessModelSection.cs
- ParserContext.cs
- SessionPageStatePersister.cs
- DynamicExpression.cs
- DataKeyCollection.cs
- QuerySubExprEliminator.cs
- RawTextInputReport.cs
- TaskFileService.cs
- PnrpPeerResolver.cs
- UpdateCommandGenerator.cs
- UserNameSecurityToken.cs
- PointKeyFrameCollection.cs
- NopReturnReader.cs
- NullableBoolConverter.cs
- InternalConfigHost.cs
- ExtensionQuery.cs
- CssClassPropertyAttribute.cs
- TreeNodeCollectionEditor.cs
- Literal.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- ImageClickEventArgs.cs
- QilLoop.cs
- MultiSelector.cs
- DataTable.cs
- DependencyPropertyChangedEventArgs.cs
- SafeLibraryHandle.cs
- UInt64.cs
- WebSysDisplayNameAttribute.cs
- RangeContentEnumerator.cs
- WebPartsSection.cs
- GatewayDefinition.cs
- ProxyElement.cs
- validationstate.cs
- DesignerUtility.cs
- TaiwanCalendar.cs
- ViewStateException.cs
- MultiTrigger.cs
- PersonalizationState.cs
- HwndSourceKeyboardInputSite.cs
- _TransmitFileOverlappedAsyncResult.cs
- State.cs
- CacheVirtualItemsEvent.cs
- SoapException.cs
- WindowsFont.cs
- x509store.cs
- DecimalAnimationBase.cs
- DecimalConstantAttribute.cs
- AutomationFocusChangedEventArgs.cs
- BezierSegment.cs
- ValidationEventArgs.cs
- RedistVersionInfo.cs
- FactoryRecord.cs
- EmptyEnumerable.cs
- XmlNavigatorFilter.cs
- ProtectedConfigurationSection.cs
- PropertyTabChangedEvent.cs
- ContainerControl.cs
- SchemaHelper.cs
- FixedDocumentSequencePaginator.cs
- TextPatternIdentifiers.cs
- VoiceObjectToken.cs
- XmlPreloadedResolver.cs
- ToolStripRenderer.cs
- DecryptedHeader.cs
- RadioButtonList.cs
- SafePipeHandle.cs
- VBIdentifierDesigner.xaml.cs
- StringHandle.cs
- PageParserFilter.cs
- RootBuilder.cs
- DataObject.cs
- PageParserFilter.cs
- TaskResultSetter.cs
- MarkedHighlightComponent.cs
- ModelProperty.cs
- CharAnimationUsingKeyFrames.cs
- FileAuthorizationModule.cs
- SQLSingleStorage.cs
- PathTooLongException.cs
- XDeferredAxisSource.cs
- RuleCache.cs
- TextRunCacheImp.cs
- InvokePatternIdentifiers.cs
- DelegateBodyWriter.cs
- ViewStateChangedEventArgs.cs
- TextEditor.cs
- CodeExpressionStatement.cs
- ISAPIWorkerRequest.cs
- GridViewSortEventArgs.cs
- Queue.cs
- SoapSchemaMember.cs
- basecomparevalidator.cs
- AssemblyName.cs
- LocalizableResourceBuilder.cs