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
- AppModelKnownContentFactory.cs
- NaturalLanguageHyphenator.cs
- IFlowDocumentViewer.cs
- MemberCollection.cs
- WindowsMenu.cs
- IdentityNotMappedException.cs
- UrlMappingsModule.cs
- ScrollEventArgs.cs
- BindableTemplateBuilder.cs
- RoutedEvent.cs
- FragmentQueryProcessor.cs
- UserControlAutomationPeer.cs
- PriorityBindingExpression.cs
- FormViewInsertedEventArgs.cs
- XmlSchemaImporter.cs
- Logging.cs
- VariantWrapper.cs
- ProgressBar.cs
- SoapObjectWriter.cs
- ResourceExpressionBuilder.cs
- CachedCompositeFamily.cs
- SelectionPatternIdentifiers.cs
- SemanticAnalyzer.cs
- XhtmlStyleClass.cs
- _FtpControlStream.cs
- ArraySortHelper.cs
- HitTestWithGeometryDrawingContextWalker.cs
- TextAutomationPeer.cs
- JournalNavigationScope.cs
- Rfc4050KeyFormatter.cs
- UseLicense.cs
- Comparer.cs
- CallbackException.cs
- GlobalDataBindingHandler.cs
- InputReportEventArgs.cs
- DocumentXPathNavigator.cs
- TreeViewDataItemAutomationPeer.cs
- MdiWindowListStrip.cs
- CreateUserWizardStep.cs
- SoapHeader.cs
- BaseCollection.cs
- PasswordPropertyTextAttribute.cs
- TypefaceMetricsCache.cs
- followingsibling.cs
- XmlSchemaSearchPattern.cs
- PartialCachingControl.cs
- RouteCollection.cs
- DomNameTable.cs
- Run.cs
- ZipIOCentralDirectoryFileHeader.cs
- EntityCommandDefinition.cs
- SHA384Managed.cs
- XslVisitor.cs
- SQLCharsStorage.cs
- NullExtension.cs
- XmlNavigatorFilter.cs
- AuthStoreRoleProvider.cs
- wgx_exports.cs
- WindowsTab.cs
- EntityProviderServices.cs
- DoubleLinkList.cs
- WebPartZoneCollection.cs
- HelpEvent.cs
- FontCollection.cs
- HexParser.cs
- PrinterUnitConvert.cs
- SafeFileMappingHandle.cs
- WriterOutput.cs
- CheckBoxBaseAdapter.cs
- RemoteWebConfigurationHost.cs
- ArgumentNullException.cs
- Translator.cs
- InvalidCastException.cs
- ConfigurationPermission.cs
- WebBrowserUriTypeConverter.cs
- MyContact.cs
- GlobalAclOperationRequirement.cs
- ClaimTypeElement.cs
- TabletCollection.cs
- OdbcFactory.cs
- DataGridViewTextBoxCell.cs
- PropertyMappingExceptionEventArgs.cs
- RuntimeConfig.cs
- View.cs
- SaveWorkflowCommand.cs
- RichTextBox.cs
- LinqToSqlWrapper.cs
- LowerCaseStringConverter.cs
- Expressions.cs
- AVElementHelper.cs
- SelectedCellsCollection.cs
- XmlSchemaValidationException.cs
- LZCodec.cs
- Identity.cs
- SqlRowUpdatingEvent.cs
- PhonemeConverter.cs
- ComponentResourceManager.cs
- CodeTypeDeclarationCollection.cs
- WebProxyScriptElement.cs
- FrameAutomationPeer.cs