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
- EFTableProvider.cs
- Literal.cs
- ServicePointManager.cs
- ConnectionPoolManager.cs
- ExtensionDataObject.cs
- FixedBufferAttribute.cs
- LinqDataSourceHelper.cs
- AccessDataSourceView.cs
- SelfIssuedAuthProofToken.cs
- WorkerRequest.cs
- coordinator.cs
- ScopeCollection.cs
- CommonDialog.cs
- HttpProfileGroupBase.cs
- DataObjectAttribute.cs
- NameSpaceExtractor.cs
- SoapAttributeOverrides.cs
- EventLogEntry.cs
- RoleBoolean.cs
- _StreamFramer.cs
- VirtualPathProvider.cs
- SystemThemeKey.cs
- TextServicesContext.cs
- TextRangeAdaptor.cs
- NavigationPropertyEmitter.cs
- SqlDataSourceStatusEventArgs.cs
- IntegrationExceptionEventArgs.cs
- MatchAttribute.cs
- ReliabilityContractAttribute.cs
- XmlSchemaSearchPattern.cs
- ConvertTextFrag.cs
- _IPv4Address.cs
- Command.cs
- Size.cs
- OrderingExpression.cs
- UnmanagedMemoryStreamWrapper.cs
- TranslateTransform3D.cs
- ControlCollection.cs
- ToolStripMenuItem.cs
- DbBuffer.cs
- SplitContainerDesigner.cs
- WorkflowOwnershipException.cs
- AuthenticatingEventArgs.cs
- SqlFlattener.cs
- LocalizationParserHooks.cs
- FormViewDeletedEventArgs.cs
- XmlWrappingWriter.cs
- AssertHelper.cs
- Pointer.cs
- BufferBuilder.cs
- Type.cs
- WebPartConnectionCollection.cs
- HtmlTableCellCollection.cs
- SQLConvert.cs
- ListControl.cs
- PolicyException.cs
- HtmlInputReset.cs
- ToolZone.cs
- PageHandlerFactory.cs
- MediaElementAutomationPeer.cs
- HtmlValidatorAdapter.cs
- CodeStatementCollection.cs
- XhtmlBasicListAdapter.cs
- ContractMapping.cs
- AdornerLayer.cs
- OrthographicCamera.cs
- LabelDesigner.cs
- Baml6Assembly.cs
- ConfigPathUtility.cs
- GenericUriParser.cs
- Point3DCollection.cs
- SqlCacheDependencySection.cs
- TextEmbeddedObject.cs
- StringFunctions.cs
- AnimationException.cs
- __Error.cs
- StringToken.cs
- DbConnectionHelper.cs
- ConnectionConsumerAttribute.cs
- String.cs
- ColorContextHelper.cs
- WebPartEditorCancelVerb.cs
- Converter.cs
- LoginViewDesigner.cs
- TableCellCollection.cs
- LocalizabilityAttribute.cs
- TokenizerHelper.cs
- GcHandle.cs
- BamlResourceSerializer.cs
- DependencyPropertyAttribute.cs
- Color.cs
- AdRotator.cs
- AccessDataSourceWizardForm.cs
- XMLSyntaxException.cs
- MarkerProperties.cs
- ServiceSecurityAuditElement.cs
- PrintPreviewGraphics.cs
- IntSecurity.cs
- assemblycache.cs
- AnonymousIdentificationSection.cs