Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WCF / infocard / Client / System / IdentityModel / Selectors / InfoCardRSAOAEPKeyExchangeFormatter.cs / 1305376 / InfoCardRSAOAEPKeyExchangeFormatter.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.IdentityModel.Selectors { using System; using System.Security.Cryptography; internal class InfoCardRSAOAEPKeyExchangeFormatter : RSAOAEPKeyExchangeFormatter { private RSA m_rsaKey; // // public constructors // public InfoCardRSAOAEPKeyExchangeFormatter() : base() {} public InfoCardRSAOAEPKeyExchangeFormatter( AsymmetricAlgorithm key ) : base( key ) { m_rsaKey = (RSA) key; } // // public methods // public override void SetKey( AsymmetricAlgorithm key ) { base.SetKey( key ); m_rsaKey = (RSA) key; } public override byte[] CreateKeyExchange( byte[] rgbData ) { if ( null != m_rsaKey && m_rsaKey is InfoCardRSACryptoProvider) { return ((InfoCardRSACryptoProvider) m_rsaKey).Encrypt(rgbData, true); } else { return base.CreateKeyExchange( rgbData ); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SpecialNameAttribute.cs
- QuaternionAnimation.cs
- MethodCallConverter.cs
- DbDataReader.cs
- Typeface.cs
- SystemUnicastIPAddressInformation.cs
- Span.cs
- UpdateManifestForBrowserApplication.cs
- FontInfo.cs
- ExpandSegment.cs
- ListItemConverter.cs
- Zone.cs
- NamespaceDecl.cs
- DataSourceCache.cs
- BindingSource.cs
- RepeaterItemEventArgs.cs
- OdbcDataReader.cs
- AuthenticateEventArgs.cs
- ScriptManagerProxy.cs
- ArglessEventHandlerProxy.cs
- ObjectSet.cs
- LoginName.cs
- SmiMetaDataProperty.cs
- ContractNamespaceAttribute.cs
- HtmlCommandAdapter.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- VectorKeyFrameCollection.cs
- ProxyWebPartManager.cs
- ValidationErrorCollection.cs
- EventManager.cs
- RequestTimeoutManager.cs
- HttpCookie.cs
- BindingOperations.cs
- CleanUpVirtualizedItemEventArgs.cs
- XpsS0ValidatingLoader.cs
- JavascriptXmlWriterWrapper.cs
- ValidationHelpers.cs
- DbSourceParameterCollection.cs
- parserscommon.cs
- ProfileManager.cs
- XmlBindingWorker.cs
- FixedBufferAttribute.cs
- ComAdminInterfaces.cs
- DragEventArgs.cs
- ThicknessConverter.cs
- Overlapped.cs
- TreeViewCancelEvent.cs
- MessageFormatterConverter.cs
- TransportBindingElement.cs
- ConversionHelper.cs
- CompModSwitches.cs
- Registry.cs
- ImageFormatConverter.cs
- FragmentQueryProcessor.cs
- UnaryExpression.cs
- Tokenizer.cs
- AuthenticationService.cs
- StructuralType.cs
- infer.cs
- FormsIdentity.cs
- ArrayTypeMismatchException.cs
- XamlReaderHelper.cs
- DefaultPropertiesToSend.cs
- BamlLocalizabilityResolver.cs
- XmlDataSource.cs
- Typography.cs
- WebPartConnectionsConnectVerb.cs
- HttpModuleCollection.cs
- OdbcReferenceCollection.cs
- GridViewColumnHeader.cs
- WebPartConnectionCollection.cs
- PtsHelper.cs
- BitmapImage.cs
- IntSecurity.cs
- namescope.cs
- XmlReflectionMember.cs
- ListSortDescription.cs
- CompressionTracing.cs
- WinCategoryAttribute.cs
- GifBitmapEncoder.cs
- ToolConsole.cs
- QilLoop.cs
- SoapCodeExporter.cs
- SqlTriggerAttribute.cs
- DocumentSchemaValidator.cs
- BinHexEncoder.cs
- DataGridSortCommandEventArgs.cs
- SimpleLine.cs
- ObjectListItemCollection.cs
- DataGridColumn.cs
- ProxyHwnd.cs
- IListConverters.cs
- ToolBar.cs
- GenericRootAutomationPeer.cs
- WMIInterop.cs
- RegexCode.cs
- ThrowHelper.cs
- DynamicResourceExtension.cs
- WebControlsSection.cs
- KerberosRequestorSecurityToken.cs