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
- ElasticEase.cs
- Form.cs
- DataBindingExpressionBuilder.cs
- PagerSettings.cs
- TemplateControl.cs
- RegisteredHiddenField.cs
- TextAction.cs
- WebPartCancelEventArgs.cs
- SqlUserDefinedAggregateAttribute.cs
- RoleService.cs
- Attachment.cs
- DbgUtil.cs
- ZoomComboBox.cs
- SyndicationDeserializer.cs
- TogglePatternIdentifiers.cs
- CompressedStack.cs
- RemotingServices.cs
- DataKeyCollection.cs
- SqlNotificationEventArgs.cs
- Rotation3D.cs
- NativeMethods.cs
- StringValidatorAttribute.cs
- DiffuseMaterial.cs
- RSAPKCS1SignatureDeformatter.cs
- CreatingCookieEventArgs.cs
- ColumnPropertiesGroup.cs
- SHA384.cs
- SamlAuthenticationClaimResource.cs
- ColorEditor.cs
- ClientScriptItemCollection.cs
- LayoutDump.cs
- AccessDataSourceDesigner.cs
- TreeNodeCollection.cs
- NavigatorInput.cs
- processwaithandle.cs
- ExecutionContext.cs
- DiagnosticStrings.cs
- ObjectDisposedException.cs
- AppDomainInfo.cs
- AncestorChangedEventArgs.cs
- ReadWriteObjectLock.cs
- COM2ColorConverter.cs
- ElementNotAvailableException.cs
- VariableExpressionConverter.cs
- SimpleTypeResolver.cs
- ImportContext.cs
- XmlComplianceUtil.cs
- WindowCollection.cs
- Char.cs
- ResourceAttributes.cs
- FragmentQueryProcessor.cs
- SmtpMail.cs
- Keywords.cs
- DoubleKeyFrameCollection.cs
- TextSpan.cs
- ReferenceConverter.cs
- ExternalFile.cs
- HideDisabledControlAdapter.cs
- PointAnimationClockResource.cs
- DataSet.cs
- TypeDescriptor.cs
- HMACSHA256.cs
- ProxyAttribute.cs
- DataGridViewRow.cs
- OleDbFactory.cs
- WindowsListViewItem.cs
- XPathNode.cs
- ValueTable.cs
- SmtpNetworkElement.cs
- WebContext.cs
- X509CertificateTrustedIssuerElementCollection.cs
- XmlSchemaSimpleType.cs
- QilStrConcatenator.cs
- LogicalExpr.cs
- DataGridViewComponentPropertyGridSite.cs
- SliderAutomationPeer.cs
- ResXResourceSet.cs
- DbInsertCommandTree.cs
- TabPanel.cs
- Model3DCollection.cs
- PrimitiveType.cs
- WindowsAuthenticationModule.cs
- FormatConvertedBitmap.cs
- MonitoringDescriptionAttribute.cs
- AssemblyNameProxy.cs
- XmlDigitalSignatureProcessor.cs
- CompilationUnit.cs
- WithParamAction.cs
- AjaxFrameworkAssemblyAttribute.cs
- ByteRangeDownloader.cs
- Thickness.cs
- TimeSpanStorage.cs
- ResourcePermissionBaseEntry.cs
- XamlStyleSerializer.cs
- SchemaTableOptionalColumn.cs
- PipelineModuleStepContainer.cs
- rsa.cs
- CompareValidator.cs
- SafeLibraryHandle.cs
- OpCodes.cs