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
- XmlDomTextWriter.cs
- TextTreeNode.cs
- SoapServerMessage.cs
- EmulateRecognizeCompletedEventArgs.cs
- DesignerTextViewAdapter.cs
- CircleEase.cs
- _ChunkParse.cs
- TraceSource.cs
- HttpResponse.cs
- MultipartIdentifier.cs
- SessionPageStateSection.cs
- SemanticKeyElement.cs
- DebugView.cs
- DataGridState.cs
- NamespaceInfo.cs
- BindToObject.cs
- WebPartConnectionsEventArgs.cs
- TextTreeFixupNode.cs
- SrgsElementFactory.cs
- SamlSecurityToken.cs
- FrameAutomationPeer.cs
- TraceSource.cs
- GridViewEditEventArgs.cs
- ErrorProvider.cs
- SizeConverter.cs
- BaseDataList.cs
- DataColumnMappingCollection.cs
- Int32CollectionValueSerializer.cs
- XMLSyntaxException.cs
- Executor.cs
- KeySplineConverter.cs
- Condition.cs
- MenuItemBinding.cs
- Sentence.cs
- CloudCollection.cs
- TableLayoutSettingsTypeConverter.cs
- DefaultPropertyAttribute.cs
- ExceptionHandler.cs
- PropertyChangingEventArgs.cs
- ITreeGenerator.cs
- MethodExpr.cs
- BindingExpressionBase.cs
- FormViewDeletedEventArgs.cs
- GroupBox.cs
- PropertyBuilder.cs
- MailDefinition.cs
- StrongNameIdentityPermission.cs
- WebPartConnectionsConnectVerb.cs
- QilChoice.cs
- StrongNameHelpers.cs
- WindowsComboBox.cs
- DialogDivider.cs
- SQLChars.cs
- StateInitializationDesigner.cs
- InitializationEventAttribute.cs
- TimelineGroup.cs
- Compiler.cs
- WebConfigurationFileMap.cs
- XmlSchemaSimpleContentExtension.cs
- SmiConnection.cs
- ThreadStaticAttribute.cs
- Viewport3DVisual.cs
- FunctionUpdateCommand.cs
- WebPartAuthorizationEventArgs.cs
- LoadItemsEventArgs.cs
- NotCondition.cs
- SortDescription.cs
- Restrictions.cs
- ParentQuery.cs
- CodeTypeDelegate.cs
- BaseParagraph.cs
- Ipv6Element.cs
- DeferredTextReference.cs
- SHA1CryptoServiceProvider.cs
- ConstrainedDataObject.cs
- XmlHierarchicalEnumerable.cs
- ToolStripItem.cs
- BitFlagsGenerator.cs
- XmlAttributeOverrides.cs
- WinFormsComponentEditor.cs
- ImageCodecInfoPrivate.cs
- Mouse.cs
- LoggedException.cs
- RecordManager.cs
- ReadOnlyCollectionBase.cs
- DataGridViewSelectedColumnCollection.cs
- ObjectViewEntityCollectionData.cs
- CommandLibraryHelper.cs
- CurrentTimeZone.cs
- JsonUriDataContract.cs
- NegationPusher.cs
- KeyboardNavigation.cs
- FtpCachePolicyElement.cs
- xml.cs
- StringPropertyBuilder.cs
- LazyTextWriterCreator.cs
- ContentPlaceHolderDesigner.cs
- FixedPageProcessor.cs
- TickBar.cs
- SelectionRange.cs