Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / 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; } } } // 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
- ObjectAnimationUsingKeyFrames.cs
- CompiledQuery.cs
- SchemaInfo.cs
- contentDescriptor.cs
- AnnotationHelper.cs
- ViewBox.cs
- WebPartVerb.cs
- PageWrapper.cs
- Point3DAnimation.cs
- ModelItemExtensions.cs
- UmAlQuraCalendar.cs
- HostingEnvironmentSection.cs
- TextDecoration.cs
- XmlSchemaSequence.cs
- ListenerElementsCollection.cs
- GPPOINTF.cs
- Cursors.cs
- assemblycache.cs
- Hash.cs
- CommonObjectSecurity.cs
- IDispatchConstantAttribute.cs
- QueryContinueDragEventArgs.cs
- DiscoveryInnerClientManaged11.cs
- MemberDomainMap.cs
- GridProviderWrapper.cs
- OracleBFile.cs
- Nullable.cs
- DispatcherExceptionEventArgs.cs
- NullEntityWrapper.cs
- SerializationInfo.cs
- EntityReference.cs
- TemplateXamlParser.cs
- RequestQueue.cs
- MemberCollection.cs
- NameObjectCollectionBase.cs
- ReadOnlyCollectionBase.cs
- SqlBuilder.cs
- SimpleMailWebEventProvider.cs
- Utils.cs
- TableNameAttribute.cs
- GotoExpression.cs
- ReflectEventDescriptor.cs
- baseaxisquery.cs
- SystemBrushes.cs
- ListViewGroupItemCollection.cs
- IxmlLineInfo.cs
- PerformanceCounterLib.cs
- DeferredBinaryDeserializerExtension.cs
- TypeResolver.cs
- DataGridViewCellToolTipTextNeededEventArgs.cs
- CompoundFileReference.cs
- HandleCollector.cs
- AttributedMetaModel.cs
- TextTreeDeleteContentUndoUnit.cs
- SizeAnimationClockResource.cs
- OAVariantLib.cs
- AncillaryOps.cs
- ReservationCollection.cs
- UIElement3D.cs
- DataReaderContainer.cs
- WebPartsPersonalization.cs
- StartUpEventArgs.cs
- ControlPager.cs
- WorkflowMarkupSerializerMapping.cs
- CodeParameterDeclarationExpressionCollection.cs
- SourceFilter.cs
- StreamUpdate.cs
- ServiceModelEnhancedConfigurationElementCollection.cs
- SqlConnectionHelper.cs
- FieldAccessException.cs
- ValuePattern.cs
- TransformCollection.cs
- XmlILAnnotation.cs
- SqlMethodTransformer.cs
- XmlSerializerFactory.cs
- WorkflowDefinitionDispenser.cs
- DataGridViewRowConverter.cs
- SmtpNegotiateAuthenticationModule.cs
- ErrorsHelper.cs
- MessageSecurityProtocol.cs
- SqlServer2KCompatibilityCheck.cs
- Nullable.cs
- VirtualPath.cs
- SmtpLoginAuthenticationModule.cs
- VideoDrawing.cs
- DocumentApplicationJournalEntry.cs
- HeaderCollection.cs
- Line.cs
- DayRenderEvent.cs
- ArgumentOutOfRangeException.cs
- TreeNodeCollection.cs
- Model3DGroup.cs
- EditingCoordinator.cs
- XmlComplianceUtil.cs
- LoadedOrUnloadedOperation.cs
- PolicyException.cs
- WizardPanel.cs
- DataRecordInternal.cs
- X509Certificate.cs
- PasswordBoxAutomationPeer.cs