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
- QilReference.cs
- ServiceHostingEnvironment.cs
- Restrictions.cs
- Operators.cs
- ExceptionUtil.cs
- Vector.cs
- dtdvalidator.cs
- ObjectQueryState.cs
- EpmContentDeSerializerBase.cs
- UpdateCompiler.cs
- SqlClientMetaDataCollectionNames.cs
- TextDecoration.cs
- Validator.cs
- RenderOptions.cs
- XPathMultyIterator.cs
- SqlDataSourceCache.cs
- RNGCryptoServiceProvider.cs
- CompilerCollection.cs
- Command.cs
- _ContextAwareResult.cs
- WinFormsComponentEditor.cs
- Win32.cs
- ListViewItemMouseHoverEvent.cs
- TerminatorSinks.cs
- ResourceContainer.cs
- StringStorage.cs
- X509PeerCertificateAuthentication.cs
- StringExpressionSet.cs
- EmptyEnumerable.cs
- ListBoxItemWrapperAutomationPeer.cs
- EventlogProvider.cs
- MessageDecoder.cs
- RecordsAffectedEventArgs.cs
- TdsParserSessionPool.cs
- ClientReliableChannelBinder.cs
- DataGridDetailsPresenter.cs
- BitmapEffectInput.cs
- EntityFunctions.cs
- TraceUtility.cs
- ActivityValidationServices.cs
- Utils.cs
- HttpPostedFileWrapper.cs
- MemberInfoSerializationHolder.cs
- WebPartDisplayMode.cs
- URLString.cs
- CodeFieldReferenceExpression.cs
- TripleDESCryptoServiceProvider.cs
- LongTypeConverter.cs
- ButtonRenderer.cs
- DbDataAdapter.cs
- WindowsFormsHelpers.cs
- SuppressMergeCheckAttribute.cs
- AuthenticationModulesSection.cs
- EncryptedData.cs
- WindowsAuthenticationModule.cs
- InstanceStoreQueryResult.cs
- X509Certificate.cs
- BaseTemplateParser.cs
- SourceChangedEventArgs.cs
- DataGridViewAutoSizeModeEventArgs.cs
- DocumentOrderQuery.cs
- Gdiplus.cs
- SafeNativeMethods.cs
- XPathItem.cs
- PathSegment.cs
- SinglePageViewer.cs
- NameValuePair.cs
- AutomationElementIdentifiers.cs
- ErasingStroke.cs
- CatalogPartDesigner.cs
- ParseChildrenAsPropertiesAttribute.cs
- ApplicationProxyInternal.cs
- ArrayWithOffset.cs
- IntSecurity.cs
- BufferedWebEventProvider.cs
- Matrix.cs
- SizeConverter.cs
- IERequestCache.cs
- TableHeaderCell.cs
- IsolatedStorageFilePermission.cs
- DependencyObjectProvider.cs
- CalendarTable.cs
- ZipIOExtraField.cs
- AnnotationService.cs
- AutomationEvent.cs
- ClientSettings.cs
- BitmapMetadata.cs
- OdbcStatementHandle.cs
- Deflater.cs
- IPGlobalProperties.cs
- InvalidPrinterException.cs
- DetectRunnableInstancesTask.cs
- IMembershipProvider.cs
- JsonSerializer.cs
- StringValueSerializer.cs
- ResolveCriteriaCD1.cs
- hresults.cs
- SourceInterpreter.cs
- ContainerActivationHelper.cs
- MimeObjectFactory.cs