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
- CellParaClient.cs
- WindowHideOrCloseTracker.cs
- unitconverter.cs
- ListViewItemMouseHoverEvent.cs
- BamlVersionHeader.cs
- SafeArrayRankMismatchException.cs
- DataGridViewDesigner.cs
- AutomationElement.cs
- TraceSwitch.cs
- CommonGetThemePartSize.cs
- SubqueryRules.cs
- AdRotatorDesigner.cs
- TimeSpanStorage.cs
- ParameterSubsegment.cs
- ValidationErrorEventArgs.cs
- LoginView.cs
- EntityConnectionStringBuilderItem.cs
- InternalResources.cs
- ContentTextAutomationPeer.cs
- UntrustedRecipientException.cs
- HttpListenerElement.cs
- RectangleHotSpot.cs
- Vector3D.cs
- TextTreeExtractElementUndoUnit.cs
- TreeSet.cs
- XmlUtil.cs
- UserControlParser.cs
- Variable.cs
- SafeRightsManagementHandle.cs
- XslVisitor.cs
- XamlStackWriter.cs
- QilReference.cs
- SecurityTokenTypes.cs
- SystemKeyConverter.cs
- SqlAggregateChecker.cs
- ExtenderProvidedPropertyAttribute.cs
- Attachment.cs
- IndexOutOfRangeException.cs
- dsa.cs
- TemplateManager.cs
- MonitorWrapper.cs
- DataContext.cs
- ObjectDataSourceView.cs
- XMLUtil.cs
- ProtocolProfile.cs
- Calendar.cs
- FixUp.cs
- SqlXml.cs
- HtmlMeta.cs
- CustomAttributeBuilder.cs
- DesignSurface.cs
- ConfigurationStrings.cs
- DataGridItemCollection.cs
- EventLogEntry.cs
- RightsManagementPermission.cs
- ConnectionPoint.cs
- ServicePoint.cs
- ContentPathSegment.cs
- InternalEnumValidatorAttribute.cs
- _emptywebproxy.cs
- FixedSOMGroup.cs
- BitSet.cs
- ZipIOExtraFieldElement.cs
- ContextMenuStrip.cs
- EditorPartChrome.cs
- DrawingContextDrawingContextWalker.cs
- SpellerHighlightLayer.cs
- ContextStack.cs
- DoubleAverageAggregationOperator.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- DbMetaDataCollectionNames.cs
- SetIndexBinder.cs
- InputDevice.cs
- HtmlElementEventArgs.cs
- Util.cs
- AVElementHelper.cs
- Timer.cs
- DataGridViewToolTip.cs
- ButtonAutomationPeer.cs
- DefaultCompensation.cs
- XmlRawWriter.cs
- WebPartVerbCollection.cs
- EmptyEnumerable.cs
- TraceXPathNavigator.cs
- SQLMoneyStorage.cs
- ResXResourceWriter.cs
- _DigestClient.cs
- AsyncStreamReader.cs
- FunctionQuery.cs
- Page.cs
- COSERVERINFO.cs
- DesignerHost.cs
- Cloud.cs
- clipboard.cs
- VBCodeProvider.cs
- GridViewSelectEventArgs.cs
- FunctionNode.cs
- ComponentResourceKey.cs
- XmlProcessingInstruction.cs
- DataServiceSaveChangesEventArgs.cs