Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WCF / infocard / Client / System / IdentityModel / Selectors / InfoCardRSAPKCS1SignatureDeformatter.cs / 1305376 / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- FontCollection.cs
- PolicyException.cs
- ClientEventManager.cs
- DataBindingHandlerAttribute.cs
- ClickablePoint.cs
- NameValueConfigurationCollection.cs
- TextTreeUndoUnit.cs
- Button.cs
- LongAverageAggregationOperator.cs
- EncodingDataItem.cs
- OutputCacheSection.cs
- ReadOnlyNameValueCollection.cs
- DbCommandTree.cs
- StoreItemCollection.cs
- WindowVisualStateTracker.cs
- DataGridViewRow.cs
- ValueTable.cs
- DoubleUtil.cs
- EditorZone.cs
- FrameworkContentElement.cs
- DefaultAsyncDataDispatcher.cs
- coordinator.cs
- _emptywebproxy.cs
- SymbolEqualComparer.cs
- Deserializer.cs
- ConfigurationStrings.cs
- LocalizedNameDescriptionPair.cs
- ModelTreeEnumerator.cs
- ArraySegment.cs
- DBDataPermission.cs
- PrivilegedConfigurationManager.cs
- HttpFileCollectionWrapper.cs
- WinEventTracker.cs
- PolyBezierSegment.cs
- FileUtil.cs
- X509RawDataKeyIdentifierClause.cs
- ResourceProviderFactory.cs
- ImageAttributes.cs
- AudioException.cs
- SchemaObjectWriter.cs
- HtmlHead.cs
- RijndaelManaged.cs
- ContainerVisual.cs
- RequestCachePolicyConverter.cs
- SettingsAttributes.cs
- NullReferenceException.cs
- XmlEnumAttribute.cs
- WCFBuildProvider.cs
- PriorityBinding.cs
- PerformanceCounterPermissionEntry.cs
- CfgParser.cs
- GridViewColumnCollection.cs
- PolyQuadraticBezierSegment.cs
- TdsParserStateObject.cs
- MetadataException.cs
- XmlIncludeAttribute.cs
- RectAnimationClockResource.cs
- PropertyEmitterBase.cs
- ValueUtilsSmi.cs
- EvidenceBase.cs
- XPathParser.cs
- WindowsToolbar.cs
- TextFormatterHost.cs
- SoapIgnoreAttribute.cs
- SpecialFolderEnumConverter.cs
- SystemSounds.cs
- String.cs
- WebServiceErrorEvent.cs
- hebrewshape.cs
- XamlDesignerSerializationManager.cs
- CustomValidator.cs
- ipaddressinformationcollection.cs
- metadatamappinghashervisitor.cs
- MexBindingBindingCollectionElement.cs
- AssemblyBuilderData.cs
- SerializationInfo.cs
- MultiView.cs
- IEnumerable.cs
- ServiceModelDictionary.cs
- SafeLocalAllocation.cs
- EmptyCollection.cs
- BrowsableAttribute.cs
- SkinBuilder.cs
- NamespaceCollection.cs
- ReadOnlyNameValueCollection.cs
- InfoCardSymmetricCrypto.cs
- ImageListImage.cs
- smtppermission.cs
- ChannelServices.cs
- ToolStripLocationCancelEventArgs.cs
- VectorAnimation.cs
- SafeCertificateStore.cs
- BindableTemplateBuilder.cs
- SystemDiagnosticsSection.cs
- SelectedDatesCollection.cs
- TrackPointCollection.cs
- CodeCommentStatementCollection.cs
- DataBindingHandlerAttribute.cs
- ObsoleteAttribute.cs
- OpacityConverter.cs