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
- LeftCellWrapper.cs
- VideoDrawing.cs
- ConfigPathUtility.cs
- AssemblyAttributes.cs
- SEHException.cs
- CollectionView.cs
- CryptoHelper.cs
- FileReservationCollection.cs
- VectorKeyFrameCollection.cs
- WmlControlAdapter.cs
- ExpandoObject.cs
- WizardDesigner.cs
- ModuleConfigurationInfo.cs
- XamlTemplateSerializer.cs
- MobileUserControlDesigner.cs
- SafeViewOfFileHandle.cs
- NetworkInformationPermission.cs
- ParserExtension.cs
- GPRECTF.cs
- CompositionTarget.cs
- newitemfactory.cs
- ColorConverter.cs
- TypeDependencyAttribute.cs
- CodeCommentStatement.cs
- BaseAutoFormat.cs
- XmlStringTable.cs
- NotSupportedException.cs
- JavaScriptObjectDeserializer.cs
- LinearGradientBrush.cs
- PerformanceCounterPermissionAttribute.cs
- ArraySubsetEnumerator.cs
- CriticalFinalizerObject.cs
- ImageField.cs
- SelfSignedCertificate.cs
- MultiDataTrigger.cs
- WebPartTransformer.cs
- SubtreeProcessor.cs
- SqlBulkCopyColumnMappingCollection.cs
- RoleManagerEventArgs.cs
- ActivityScheduledQuery.cs
- PlatformNotSupportedException.cs
- UrlPropertyAttribute.cs
- EntityConnectionStringBuilderItem.cs
- WebPermission.cs
- BaseServiceProvider.cs
- PropertyKey.cs
- BackgroundWorker.cs
- LogRestartAreaEnumerator.cs
- CommandDesigner.cs
- ProviderUtil.cs
- HttpClientCertificate.cs
- InputLanguageProfileNotifySink.cs
- ExtenderProvidedPropertyAttribute.cs
- TreeBuilder.cs
- DebuggerService.cs
- Types.cs
- StatusBarDrawItemEvent.cs
- DataViewManager.cs
- ZipIOModeEnforcingStream.cs
- OLEDB_Util.cs
- SAPIEngineTypes.cs
- PolyQuadraticBezierSegment.cs
- ToolStripSplitButton.cs
- IsolatedStorageFileStream.cs
- EditorPartChrome.cs
- DnsElement.cs
- DataGridViewCellValidatingEventArgs.cs
- TextBoxAutoCompleteSourceConverter.cs
- CompositeCollection.cs
- PreloadedPackages.cs
- ClientOptions.cs
- WindowsListViewGroupSubsetLink.cs
- SafeIUnknown.cs
- SamlNameIdentifierClaimResource.cs
- MimeWriter.cs
- LinqTreeNodeEvaluator.cs
- AuthenticationSection.cs
- SettingsAttributeDictionary.cs
- ListMarkerSourceInfo.cs
- BuildTopDownAttribute.cs
- RelationalExpressions.cs
- ProviderConnectionPoint.cs
- ImagingCache.cs
- PersonalizationState.cs
- AutomationElementCollection.cs
- HelpFileFileNameEditor.cs
- DoubleKeyFrameCollection.cs
- DataSourceExpression.cs
- XmlCharType.cs
- AdRotator.cs
- XmlAttributeAttribute.cs
- WorkflowOperationFault.cs
- ObjectReaderCompiler.cs
- SqlInternalConnectionTds.cs
- ValueUtilsSmi.cs
- WorkflowOperationFault.cs
- KeyedCollection.cs
- IISUnsafeMethods.cs
- RepeaterCommandEventArgs.cs
- Calendar.cs