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
- TreeNode.cs
- Size3D.cs
- FocusWithinProperty.cs
- ConstrainedDataObject.cs
- EnumDataContract.cs
- ObjectSet.cs
- DifferencingCollection.cs
- SapiAttributeParser.cs
- RuleSetBrowserDialog.cs
- PreservationFileReader.cs
- WebResourceAttribute.cs
- LinqDataSourceContextEventArgs.cs
- NetworkStream.cs
- Directory.cs
- SocketPermission.cs
- MainMenu.cs
- DataTableMapping.cs
- NameHandler.cs
- CheckedPointers.cs
- EditorPartChrome.cs
- PageAsyncTaskManager.cs
- ConstrainedGroup.cs
- SqlTypeConverter.cs
- TypeUsageBuilder.cs
- ObfuscateAssemblyAttribute.cs
- SecurityPolicySection.cs
- LocalizationParserHooks.cs
- CommentEmitter.cs
- HashSetEqualityComparer.cs
- FtpWebResponse.cs
- DesignerForm.cs
- AssemblyResolver.cs
- __Filters.cs
- HelpInfo.cs
- ConnectionStringsSection.cs
- PropertyEmitter.cs
- TextPattern.cs
- _HelperAsyncResults.cs
- ComplusTypeValidator.cs
- MenuEventArgs.cs
- RenderingBiasValidation.cs
- CalendarTable.cs
- ProcessHostMapPath.cs
- EncoderBestFitFallback.cs
- ConfigurationStrings.cs
- LogSwitch.cs
- SqlUdtInfo.cs
- unitconverter.cs
- BulletedList.cs
- PatternMatcher.cs
- SQLByte.cs
- Light.cs
- SourceChangedEventArgs.cs
- PropertyInformationCollection.cs
- DataServiceExpressionVisitor.cs
- Internal.cs
- SerialStream.cs
- RotateTransform.cs
- CorrelationService.cs
- DataBindingExpressionBuilder.cs
- BitmapEncoder.cs
- DataGridCommandEventArgs.cs
- CustomPopupPlacement.cs
- StandardOleMarshalObject.cs
- Misc.cs
- SchemaAttDef.cs
- AppDomainManager.cs
- FigureParagraph.cs
- CommentAction.cs
- DesignerAutoFormatCollection.cs
- FileChangeNotifier.cs
- SimpleNameService.cs
- ImageAutomationPeer.cs
- SchemaImporter.cs
- IconBitmapDecoder.cs
- TextModifierScope.cs
- MDIWindowDialog.cs
- PropertyChangingEventArgs.cs
- TransformerConfigurationWizardBase.cs
- Visual3DCollection.cs
- InputMethodStateTypeInfo.cs
- AddDataControlFieldDialog.cs
- OrderedDictionary.cs
- EntityDataSourceContextCreatingEventArgs.cs
- ChannelManager.cs
- TextOptions.cs
- Visual.cs
- ShadowGlyph.cs
- PackageProperties.cs
- LineGeometry.cs
- DelegatedStream.cs
- documentsequencetextcontainer.cs
- UInt64.cs
- RTLAwareMessageBox.cs
- Storyboard.cs
- UIElement3DAutomationPeer.cs
- Profiler.cs
- GradientBrush.cs
- diagnosticsswitches.cs
- TypeValidationEventArgs.cs