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
- MethodToken.cs
- BindingsCollection.cs
- CallbackCorrelationInitializer.cs
- CodeCommentStatement.cs
- PathParser.cs
- DetailsViewDeleteEventArgs.cs
- AutomationAttributeInfo.cs
- InfoCardServiceInstallComponent.cs
- querybuilder.cs
- ObjectDataSourceEventArgs.cs
- ImageAttributes.cs
- IndexOutOfRangeException.cs
- ConfigurationConverterBase.cs
- RequestCacheManager.cs
- PrimitiveDataContract.cs
- Image.cs
- AbandonedMutexException.cs
- BuildProviderAppliesToAttribute.cs
- MimeBasePart.cs
- ToolstripProfessionalRenderer.cs
- securestring.cs
- ListenerSessionConnectionReader.cs
- SqlDataSourceSummaryPanel.cs
- WindowsTitleBar.cs
- CrossContextChannel.cs
- AvtEvent.cs
- MailMessageEventArgs.cs
- AssemblyAttributes.cs
- DeploymentSectionCache.cs
- DesignerGenericWebPart.cs
- List.cs
- TypeConverter.cs
- Composition.cs
- RouteParametersHelper.cs
- QualificationDataAttribute.cs
- ElementAtQueryOperator.cs
- SqlDataSourceCache.cs
- FieldNameLookup.cs
- FieldAccessException.cs
- UserControlAutomationPeer.cs
- SQLDateTimeStorage.cs
- EncodingStreamWrapper.cs
- CharacterHit.cs
- SqlIdentifier.cs
- DiagnosticTrace.cs
- TreeNodeCollection.cs
- WebContext.cs
- BuildManagerHost.cs
- PathGeometry.cs
- HwndHost.cs
- StorageFunctionMapping.cs
- ProfileInfo.cs
- SecurityContext.cs
- ApplicationBuildProvider.cs
- GraphicsState.cs
- BookmarkScopeManager.cs
- TextEditor.cs
- Command.cs
- DataGridDetailsPresenterAutomationPeer.cs
- Maps.cs
- HierarchicalDataSourceControl.cs
- MD5Cng.cs
- ScriptBehaviorDescriptor.cs
- FullTextState.cs
- TemplatePartAttribute.cs
- ImageMap.cs
- BitmapData.cs
- StringWriter.cs
- LogLogRecord.cs
- CopyOnWriteList.cs
- PreDigestedSignedInfo.cs
- DbProviderServices.cs
- StringBlob.cs
- XmlElementList.cs
- BaseTemplateCodeDomTreeGenerator.cs
- DataSpaceManager.cs
- Binding.cs
- XmlTextWriter.cs
- Funcletizer.cs
- OdbcConnectionFactory.cs
- CreateUserErrorEventArgs.cs
- User.cs
- Psha1DerivedKeyGeneratorHelper.cs
- DefaultTypeArgumentAttribute.cs
- ContextDataSourceContextData.cs
- SimpleBitVector32.cs
- TemplateBindingExpression.cs
- JsonServiceDocumentSerializer.cs
- GenerateScriptTypeAttribute.cs
- BufferModeSettings.cs
- DecimalAnimation.cs
- SerializationHelper.cs
- GAC.cs
- XmlSchemaSimpleContentExtension.cs
- LineBreakRecord.cs
- PlanCompiler.cs
- TraceContextRecord.cs
- MsmqHostedTransportConfiguration.cs
- ImageDrawing.cs
- BufferedReadStream.cs