Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / 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; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WebHttpBindingElement.cs
- FormConverter.cs
- MatrixCamera.cs
- StrokeNode.cs
- ExpressionCopier.cs
- ListChangedEventArgs.cs
- StrokeCollection2.cs
- RowUpdatedEventArgs.cs
- DesignerLoader.cs
- ProtectedProviderSettings.cs
- ClickablePoint.cs
- ChtmlTextWriter.cs
- MachineKeyConverter.cs
- EntityDataSourceStatementEditor.cs
- GridSplitter.cs
- TransformValueSerializer.cs
- OrderedEnumerableRowCollection.cs
- ControlDesignerState.cs
- DatatypeImplementation.cs
- SerializationException.cs
- UpdateDelegates.Generated.cs
- BmpBitmapDecoder.cs
- ProcessManager.cs
- ExcCanonicalXml.cs
- HandleTable.cs
- ActiveXHelper.cs
- TableLayoutRowStyleCollection.cs
- OperatorExpressions.cs
- SafeRegistryHandle.cs
- HtmlForm.cs
- ToolStripItem.cs
- Pens.cs
- ProviderConnectionPoint.cs
- EmptyCollection.cs
- BrowserTree.cs
- AsymmetricSignatureFormatter.cs
- connectionpool.cs
- Trace.cs
- AppDomain.cs
- DataContractSerializerOperationFormatter.cs
- FilterElement.cs
- BaseDataBoundControl.cs
- TCPListener.cs
- MulticastDelegate.cs
- VScrollProperties.cs
- FileDetails.cs
- ToolStripItemCollection.cs
- ImageBrush.cs
- SimpleHandlerFactory.cs
- PrintEvent.cs
- Convert.cs
- Table.cs
- ManipulationCompletedEventArgs.cs
- SkinBuilder.cs
- ImportContext.cs
- AccessorTable.cs
- RoleService.cs
- ToolStripMenuItemDesigner.cs
- WasEndpointConfigContainer.cs
- SaveFileDialogDesigner.cs
- ComplusEndpointConfigContainer.cs
- ObfuscationAttribute.cs
- ResourceExpressionBuilder.cs
- Run.cs
- TypedReference.cs
- RequestCacheManager.cs
- ObjectItemAttributeAssemblyLoader.cs
- DataBindingHandlerAttribute.cs
- RepeaterDataBoundAdapter.cs
- TableCell.cs
- PolicyException.cs
- FilterException.cs
- TextViewSelectionProcessor.cs
- DBCommand.cs
- ErrorsHelper.cs
- CollectionBuilder.cs
- CodeMemberProperty.cs
- LicenseManager.cs
- CapiSafeHandles.cs
- ILGenerator.cs
- Int64KeyFrameCollection.cs
- CheckBox.cs
- InputScopeConverter.cs
- WindowsFormsHost.cs
- InstancePersistenceException.cs
- PeerEndPoint.cs
- InvalidEnumArgumentException.cs
- ClientFormsAuthenticationCredentials.cs
- SqlConnectionStringBuilder.cs
- XmlSchemaChoice.cs
- CodeExporter.cs
- XpsViewerException.cs
- MetadataItemEmitter.cs
- SRef.cs
- basevalidator.cs
- XamlVector3DCollectionSerializer.cs
- MappingException.cs
- RsaKeyIdentifierClause.cs
- OleDbFactory.cs
- TableItemPattern.cs