Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / infocard / Client / System / IdentityModel / Selectors / InfoCardRSAPKCS1SignatureFormatter.cs / 1 / 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. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Timer.cs
- RefreshPropertiesAttribute.cs
- RtfToXamlReader.cs
- DoubleConverter.cs
- HttpConfigurationSystem.cs
- TabControl.cs
- HtmlValidatorAdapter.cs
- ReflectPropertyDescriptor.cs
- SchemaCollectionCompiler.cs
- IProvider.cs
- Mutex.cs
- Delegate.cs
- ConfigurationSchemaErrors.cs
- XPathNodeList.cs
- DisplayClaim.cs
- PolyQuadraticBezierSegment.cs
- InputManager.cs
- XmlReaderSettings.cs
- WebHttpSecurityModeHelper.cs
- PingReply.cs
- DataGridColumn.cs
- Ipv6Element.cs
- TypeUsage.cs
- FormViewDeletedEventArgs.cs
- FontDifferentiator.cs
- TypeBuilder.cs
- SvcMapFileLoader.cs
- CollectionChange.cs
- XmlArrayAttribute.cs
- ConfigXmlCDataSection.cs
- GridViewUpdateEventArgs.cs
- SourceElementsCollection.cs
- UIAgentMonitorHandle.cs
- WindowsSspiNegotiation.cs
- DataListItemCollection.cs
- BaseConfigurationRecord.cs
- AtomMaterializer.cs
- DefaultMergeHelper.cs
- Compress.cs
- XamlTemplateSerializer.cs
- ManipulationCompletedEventArgs.cs
- CategoryEditor.cs
- QuestionEventArgs.cs
- StrokeIntersection.cs
- EncryptedKey.cs
- ImageCodecInfo.cs
- CryptoApi.cs
- ThreadLocal.cs
- SiteMapNodeItem.cs
- BulletDecorator.cs
- DataKey.cs
- ParserOptions.cs
- RelatedEnd.cs
- TemplatedWizardStep.cs
- TableLayoutStyleCollection.cs
- ToolStripRenderer.cs
- XmlNamespaceManager.cs
- WaveHeader.cs
- CoTaskMemHandle.cs
- FusionWrap.cs
- HostedHttpRequestAsyncResult.cs
- WCFBuildProvider.cs
- SqlXmlStorage.cs
- PageBuildProvider.cs
- DataGridTable.cs
- SignatureToken.cs
- TextRenderingModeValidation.cs
- StateDesigner.Layouts.cs
- MgmtResManager.cs
- Boolean.cs
- CatchBlock.cs
- FormParameter.cs
- HttpUnhandledOperationInvoker.cs
- ComplexObject.cs
- SerializationAttributes.cs
- SQLDateTimeStorage.cs
- DataSourceCache.cs
- InternalRelationshipCollection.cs
- SelectedGridItemChangedEvent.cs
- FilterQueryOptionExpression.cs
- FullTextLine.cs
- BaseConfigurationRecord.cs
- GridProviderWrapper.cs
- EmptyEnumerable.cs
- ExpressionConverter.cs
- ThreadStartException.cs
- TableItemStyle.cs
- StrongNamePublicKeyBlob.cs
- SystemSounds.cs
- NullReferenceException.cs
- PropertyPushdownHelper.cs
- VectorAnimationUsingKeyFrames.cs
- XMLSchema.cs
- X509ChainElement.cs
- CodeMethodReturnStatement.cs
- PartManifestEntry.cs
- PasswordPropertyTextAttribute.cs
- AnimatedTypeHelpers.cs
- SiteMapSection.cs
- ConfigurationValue.cs