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
- GeneralTransform3DTo2D.cs
- MarginCollapsingState.cs
- Compensate.cs
- ExtendedPropertyDescriptor.cs
- DbConnectionStringCommon.cs
- KeyValueInternalCollection.cs
- ZoneMembershipCondition.cs
- RtType.cs
- ELinqQueryState.cs
- ProvidersHelper.cs
- MethodExpr.cs
- CallbackValidatorAttribute.cs
- SQLBinary.cs
- RealizationContext.cs
- TranslateTransform3D.cs
- TextRangeAdaptor.cs
- OleDbException.cs
- CodeAttributeDeclarationCollection.cs
- InvalidPropValue.cs
- ValidationSummary.cs
- NameNode.cs
- LassoSelectionBehavior.cs
- ContentType.cs
- Guid.cs
- StorageMappingItemCollection.cs
- Visual.cs
- PagePropertiesChangingEventArgs.cs
- AssemblyAssociatedContentFileAttribute.cs
- TextViewDesigner.cs
- MasterPageBuildProvider.cs
- SqlDataReaderSmi.cs
- SqlTriggerContext.cs
- SqlClientMetaDataCollectionNames.cs
- AppSettingsExpressionBuilder.cs
- DataSourceGroupCollection.cs
- Pts.cs
- StyleModeStack.cs
- SmtpSection.cs
- TextFindEngine.cs
- CngAlgorithm.cs
- SqlWebEventProvider.cs
- MD5CryptoServiceProvider.cs
- EastAsianLunisolarCalendar.cs
- SqlFacetAttribute.cs
- ToolTipService.cs
- Point3DAnimationUsingKeyFrames.cs
- PerformanceCounterManager.cs
- TextEditorSpelling.cs
- _DynamicWinsockMethods.cs
- DataGridTextBoxColumn.cs
- StateMachineWorkflowInstance.cs
- ContainerAction.cs
- DummyDataSource.cs
- HtmlShim.cs
- TableCellCollection.cs
- DateTime.cs
- CaseCqlBlock.cs
- BoundColumn.cs
- ValueUnavailableException.cs
- FormsAuthenticationTicket.cs
- HttpModuleAction.cs
- LassoSelectionBehavior.cs
- ObjectStorage.cs
- TransactedBatchContext.cs
- CustomDictionarySources.cs
- StateMachineSubscription.cs
- InputScopeConverter.cs
- DesignerForm.cs
- TableLayout.cs
- DynamicPhysicalDiscoSearcher.cs
- MimeMultiPart.cs
- HyperLink.cs
- CodeTypeOfExpression.cs
- AssemblyBuilderData.cs
- _MultipleConnectAsync.cs
- CngAlgorithmGroup.cs
- AnchoredBlock.cs
- Main.cs
- FormParameter.cs
- tooltip.cs
- Transform.cs
- COM2Properties.cs
- DocumentAutomationPeer.cs
- RegistryKey.cs
- CacheHelper.cs
- ComponentCommands.cs
- PersistChildrenAttribute.cs
- IndentedTextWriter.cs
- BrowserTree.cs
- DrawingContextWalker.cs
- TickBar.cs
- XamlReaderHelper.cs
- X509CertificateValidator.cs
- HebrewNumber.cs
- StrokeSerializer.cs
- FontWeights.cs
- LinkedResourceCollection.cs
- AxisAngleRotation3D.cs
- WindowsSecurityTokenAuthenticator.cs
- WebPartActionVerb.cs