Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / infocard / Client / System / IdentityModel / Selectors / InfoCardRSAPKCS1SignatureDeformatter.cs / 1 / InfoCardRSAPKCS1SignatureDeformatter.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.IdentityModel.Selectors { using System; using System.Security.Cryptography; internal class InfoCardRSAPKCS1SignatureDeformatter : RSAPKCS1SignatureDeformatter { private RSA m_rsaKey; // RSA Key value to do decrypt operation private string m_strOID; // OID value for the HASH algorithm // // public constructors // public InfoCardRSAPKCS1SignatureDeformatter() : base() {} public InfoCardRSAPKCS1SignatureDeformatter( 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 bool VerifySignature( byte[] rgbHash, byte[] rgbSignature ) { if ( !( m_strOID == null || m_rsaKey == null || rgbHash == null || rgbSignature == null ) && m_rsaKey is InfoCardRSACryptoProvider ) { return ((InfoCardRSACryptoProvider) m_rsaKey).VerifyHash(rgbHash, m_strOID, rgbSignature); } else { return base.VerifySignature( rgbHash, rgbSignature ); } } } } // 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
- CacheAxisQuery.cs
- XmlAttributeOverrides.cs
- Command.cs
- RowCache.cs
- ButtonChrome.cs
- ExtractCollection.cs
- BindingManagerDataErrorEventArgs.cs
- Object.cs
- Rect.cs
- ListItemCollection.cs
- Privilege.cs
- TextServicesCompartmentEventSink.cs
- StorageEntityContainerMapping.cs
- ListControl.cs
- QueryCacheEntry.cs
- InfiniteTimeSpanConverter.cs
- ProgressBarRenderer.cs
- SmiEventStream.cs
- BuildProviderUtils.cs
- ToolboxComponentsCreatedEventArgs.cs
- XmlSerializerAssemblyAttribute.cs
- DocumentPageViewAutomationPeer.cs
- SqlConnection.cs
- SmtpReplyReader.cs
- TextOnlyOutput.cs
- tooltip.cs
- PointHitTestParameters.cs
- SubMenuStyle.cs
- XpsFixedDocumentSequenceReaderWriter.cs
- X509PeerCertificateAuthenticationElement.cs
- CompModSwitches.cs
- RoleGroupCollection.cs
- StatusBarItemAutomationPeer.cs
- InputQueueChannelAcceptor.cs
- DbBuffer.cs
- LocatorPart.cs
- ContentTextAutomationPeer.cs
- XPathNodeList.cs
- SignatureResourcePool.cs
- CodeIdentifiers.cs
- ProjectionRewriter.cs
- UnsafeNativeMethods.cs
- ReachUIElementCollectionSerializerAsync.cs
- IdentityNotMappedException.cs
- XmlQuerySequence.cs
- JsonWriter.cs
- MsmqProcessProtocolHandler.cs
- CollectionConverter.cs
- PrintPageEvent.cs
- RenderingBiasValidation.cs
- NetworkAddressChange.cs
- ClientBuildManagerCallback.cs
- BatchWriter.cs
- Int32.cs
- XPathPatternParser.cs
- TextWriter.cs
- ScriptReferenceBase.cs
- RegexRunner.cs
- AutomationPattern.cs
- AddInAdapter.cs
- dataprotectionpermission.cs
- NavigatingCancelEventArgs.cs
- AttachmentService.cs
- DbInsertCommandTree.cs
- _HeaderInfo.cs
- PackagingUtilities.cs
- InputMethod.cs
- Page.cs
- TextDecorationLocationValidation.cs
- XmlDocumentViewSchema.cs
- MemberDescriptor.cs
- WebPartHelpVerb.cs
- CounterSetInstance.cs
- ACL.cs
- ScaleTransform3D.cs
- EncoderNLS.cs
- Vector3DAnimationUsingKeyFrames.cs
- RequestChannelBinder.cs
- EmptyQuery.cs
- Int32RectValueSerializer.cs
- HashRepartitionStream.cs
- DeviceContexts.cs
- XmlnsCache.cs
- processwaithandle.cs
- ToolStripGrip.cs
- Triangle.cs
- ListView.cs
- AddInPipelineAttributes.cs
- HostProtectionPermission.cs
- TimeEnumHelper.cs
- Debug.cs
- PageSettings.cs
- WebServiceReceiveDesigner.cs
- StreamWriter.cs
- entitydatasourceentitysetnameconverter.cs
- ToolTip.cs
- AsymmetricKeyExchangeFormatter.cs
- ConnectionsZone.cs
- DataServiceRequestOfT.cs
- StringValueConverter.cs