Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WCF / infocard / Client / System / IdentityModel / Selectors / InfoCardRSAPKCS1SignatureFormatter.cs / 1305376 / InfoCardRSAPKCS1SignatureFormatter.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.IdentityModel.Selectors { using System; using System.Security.Cryptography; internal class InfoCardRSAPKCS1SignatureFormatter : RSAPKCS1SignatureFormatter { private RSA m_rsaKey; private string m_strOID; // // public constructors // public InfoCardRSAPKCS1SignatureFormatter() : base() {} public InfoCardRSAPKCS1SignatureFormatter( 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 void SetHashAlgorithm( string strName ) { base.SetHashAlgorithm( strName ); m_strOID = CryptoConfig.MapNameToOID(strName); } public override byte[] CreateSignature(byte[] rgbHash) { if ( !( null == m_strOID || null == m_rsaKey || null == rgbHash ) && m_rsaKey is InfoCardRSACryptoProvider ) { return ((InfoCardRSACryptoProvider) m_rsaKey).SignHash( rgbHash, m_strOID ); } else { return base.CreateSignature( rgbHash ); } } } } // 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
- ListViewGroupItemCollection.cs
- TimeEnumHelper.cs
- TreeWalker.cs
- PageRanges.cs
- StreamWithDictionary.cs
- AttachedPropertyInfo.cs
- ListSortDescription.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- HyperlinkAutomationPeer.cs
- VisualState.cs
- AuthorizationSection.cs
- XmlSchemaExternal.cs
- HttpCachePolicyWrapper.cs
- PassportAuthenticationModule.cs
- EntityWrapper.cs
- unitconverter.cs
- BCryptHashAlgorithm.cs
- ValueProviderWrapper.cs
- TypeForwardedToAttribute.cs
- DataBindingCollection.cs
- Int32Storage.cs
- MenuStrip.cs
- SvcMapFile.cs
- EffectiveValueEntry.cs
- TextTreeNode.cs
- CngKey.cs
- DescendantBaseQuery.cs
- SqlInternalConnectionTds.cs
- HtmlInputHidden.cs
- VirtualDirectoryMappingCollection.cs
- RegexMatchCollection.cs
- DeliveryStrategy.cs
- Resources.Designer.cs
- OleDbConnectionFactory.cs
- StringFreezingAttribute.cs
- BulletedListEventArgs.cs
- WindowsListBox.cs
- FrameworkElementFactory.cs
- InstanceDescriptor.cs
- XmlBufferReader.cs
- Thumb.cs
- Package.cs
- InlineObject.cs
- oledbmetadatacollectionnames.cs
- Converter.cs
- SystemResourceHost.cs
- ClientConfigurationHost.cs
- CodeSubDirectory.cs
- DropDownButton.cs
- DesignTimeParseData.cs
- UniqueIdentifierService.cs
- SqlXmlStorage.cs
- ProjectionPlanCompiler.cs
- ProxyWebPartConnectionCollection.cs
- ConfigurationStrings.cs
- Transactions.cs
- DataBinding.cs
- StaticExtension.cs
- MenuItemBindingCollection.cs
- JumpPath.cs
- BindingContext.cs
- IODescriptionAttribute.cs
- HtmlElementCollection.cs
- Control.cs
- DesignerAutoFormatStyle.cs
- HttpModuleCollection.cs
- BamlRecordReader.cs
- EnumBuilder.cs
- TreeIterator.cs
- HostExecutionContextManager.cs
- RotateTransform.cs
- StreamUpdate.cs
- OrderedDictionary.cs
- M3DUtil.cs
- DeleteIndexBinder.cs
- PopupEventArgs.cs
- SqlDataSourceStatusEventArgs.cs
- TextDocumentView.cs
- SecureStringHasher.cs
- ArrayWithOffset.cs
- SafeBitVector32.cs
- OracleParameterBinding.cs
- CharacterString.cs
- ClientBuildManagerCallback.cs
- PathGeometry.cs
- WindowsProgressbar.cs
- Matrix3D.cs
- PeerOutputChannel.cs
- XmlDataContract.cs
- EncoderNLS.cs
- DrawingAttributesDefaultValueFactory.cs
- Shape.cs
- securitycriticaldata.cs
- SystemColors.cs
- HttpResponseHeader.cs
- Errors.cs
- DoubleLinkListEnumerator.cs
- NamespaceInfo.cs
- JournalEntryStack.cs
- DesignerSerializerAttribute.cs