Code:
/ FX-1434 / FX-1434 / 1.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
- NeutralResourcesLanguageAttribute.cs
- IdentityReference.cs
- ReadOnlyMetadataCollection.cs
- IisTraceListener.cs
- CatalogZoneBase.cs
- MouseButtonEventArgs.cs
- MappingItemCollection.cs
- TextReader.cs
- Win32Native.cs
- ObjectDataSourceEventArgs.cs
- DataProtection.cs
- AppSettingsExpressionEditor.cs
- Model3D.cs
- _ShellExpression.cs
- TransformCollection.cs
- ScrollViewerAutomationPeer.cs
- SlotInfo.cs
- BodyGlyph.cs
- HyperLink.cs
- MachineKeySection.cs
- StringValidator.cs
- ApplicationActivator.cs
- Binding.cs
- SqlError.cs
- ToolStripHighContrastRenderer.cs
- FactoryId.cs
- StringInfo.cs
- ParseChildrenAsPropertiesAttribute.cs
- Wildcard.cs
- XmlTextReaderImplHelpers.cs
- GridViewUpdatedEventArgs.cs
- DataGridCommandEventArgs.cs
- SrgsElement.cs
- SectionVisual.cs
- CompositeDataBoundControl.cs
- DesignerCommandAdapter.cs
- SrgsToken.cs
- ConnectionPointGlyph.cs
- OleDbParameterCollection.cs
- ScrollItemPattern.cs
- ConfigurationValue.cs
- WinEventQueueItem.cs
- FunctionDescription.cs
- LineBreak.cs
- NetTcpSectionData.cs
- DataColumnChangeEvent.cs
- FontCacheUtil.cs
- RegexWriter.cs
- PropertyValue.cs
- SID.cs
- OleAutBinder.cs
- RsaSecurityTokenAuthenticator.cs
- Misc.cs
- arclist.cs
- MergablePropertyAttribute.cs
- CTreeGenerator.cs
- HighlightComponent.cs
- CodeExporter.cs
- peernodestatemanager.cs
- DragDeltaEventArgs.cs
- TimersDescriptionAttribute.cs
- OutOfMemoryException.cs
- MulticastNotSupportedException.cs
- DrawingServices.cs
- indexingfiltermarshaler.cs
- Thread.cs
- CombinedGeometry.cs
- ItemAutomationPeer.cs
- TrustManager.cs
- TabControlAutomationPeer.cs
- TypeConverterHelper.cs
- PriorityQueue.cs
- CompoundFileStorageReference.cs
- GeometryDrawing.cs
- RuleInfoComparer.cs
- Setter.cs
- GridViewUpdatedEventArgs.cs
- WebPartDisplayModeCancelEventArgs.cs
- DetailsViewPagerRow.cs
- ValidatingPropertiesEventArgs.cs
- ClientBuildManager.cs
- AsmxEndpointPickerExtension.cs
- CollectionEditorDialog.cs
- SchemaNames.cs
- ResXDataNode.cs
- SynchronizationFilter.cs
- CodeIdentifier.cs
- DelegatingTypeDescriptionProvider.cs
- ConfigXmlComment.cs
- WeakReferenceList.cs
- ObjectStateFormatter.cs
- GeneralTransform2DTo3DTo2D.cs
- FeatureAttribute.cs
- TdsRecordBufferSetter.cs
- _AcceptOverlappedAsyncResult.cs
- LocalizedNameDescriptionPair.cs
- InstalledFontCollection.cs
- DoubleAnimationBase.cs
- AutomationPropertyInfo.cs
- MenuDesigner.cs