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
- Manipulation.cs
- ValidationError.cs
- SecurityAlgorithmSuite.cs
- EventInfo.cs
- LinkButton.cs
- PropertyNames.cs
- KeysConverter.cs
- ListSortDescriptionCollection.cs
- DataServiceQueryOfT.cs
- ObjectViewFactory.cs
- ControlBuilder.cs
- XmlWriterSettings.cs
- WebOperationContext.cs
- RangeExpression.cs
- GeneralTransform3DTo2D.cs
- ComboBox.cs
- DisplayMemberTemplateSelector.cs
- HuffmanTree.cs
- WebServiceData.cs
- TransformerTypeCollection.cs
- WebPartZoneAutoFormat.cs
- ArrayHelper.cs
- HttpDebugHandler.cs
- GrammarBuilderBase.cs
- Comparer.cs
- ResXResourceSet.cs
- PersonalizationStateInfoCollection.cs
- ErrorFormatter.cs
- NativeCppClassAttribute.cs
- UnionCqlBlock.cs
- ResourceType.cs
- DataGridViewCellStyleConverter.cs
- NumberFormatInfo.cs
- XmlAnyElementAttributes.cs
- NamedPipeHostedTransportConfiguration.cs
- ItemPager.cs
- CharacterMetrics.cs
- PostBackTrigger.cs
- UIElement3D.cs
- shaperfactoryquerycachekey.cs
- ellipse.cs
- DynamicILGenerator.cs
- XMLSyntaxException.cs
- ObjectIDGenerator.cs
- StyleHelper.cs
- CustomAttributeSerializer.cs
- PageCatalogPart.cs
- RectangleHotSpot.cs
- UnauthorizedWebPart.cs
- DesignerSerializationManager.cs
- HScrollProperties.cs
- ApplicationServicesHostFactory.cs
- HyperLinkDesigner.cs
- StrokeNode.cs
- CreatingCookieEventArgs.cs
- ImageList.cs
- TemplateBindingExpressionConverter.cs
- Events.cs
- EllipseGeometry.cs
- XmlWrappingWriter.cs
- BrowsableAttribute.cs
- FileDialog.cs
- SynchronizationLockException.cs
- DrawingAttributes.cs
- RepeaterItemCollection.cs
- HtmlTableRow.cs
- DesignerCapabilities.cs
- ObjectReaderCompiler.cs
- IxmlLineInfo.cs
- Clipboard.cs
- DefaultValueTypeConverter.cs
- SettingsPropertyValueCollection.cs
- ComponentCollection.cs
- SQLConvert.cs
- InvalidOperationException.cs
- MD5CryptoServiceProvider.cs
- AutomationProperties.cs
- ToolboxComponentsCreatingEventArgs.cs
- CommittableTransaction.cs
- FieldInfo.cs
- DescendantOverDescendantQuery.cs
- OutgoingWebResponseContext.cs
- LineBreak.cs
- StrokeDescriptor.cs
- SRef.cs
- XmlSequenceWriter.cs
- PrivacyNoticeBindingElement.cs
- CurrentChangingEventArgs.cs
- WindowsListBox.cs
- DataService.cs
- NameTable.cs
- WmfPlaceableFileHeader.cs
- Manipulation.cs
- StaticResourceExtension.cs
- SiteMapDataSource.cs
- EventPropertyMap.cs
- RepeatEnumerable.cs
- CommandLineParser.cs
- ManualResetEvent.cs
- ClearTypeHintValidation.cs