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
- TypeSource.cs
- TabItemWrapperAutomationPeer.cs
- XmlWrappingReader.cs
- XamlTemplateSerializer.cs
- WebPartZoneDesigner.cs
- HtmlForm.cs
- DiffuseMaterial.cs
- URLString.cs
- JsonFormatWriterGenerator.cs
- CustomAttributeBuilder.cs
- QueuePathDialog.cs
- recordstate.cs
- InvokeHandlers.cs
- CallTemplateAction.cs
- CSharpCodeProvider.cs
- HtmlTernaryTree.cs
- ValueSerializer.cs
- CubicEase.cs
- WindowsRegion.cs
- CalculatedColumn.cs
- ParamArrayAttribute.cs
- TogglePattern.cs
- ErrorBehavior.cs
- ResourceReferenceExpression.cs
- DotAtomReader.cs
- Transform3DCollection.cs
- TableParagraph.cs
- Error.cs
- SourceFileBuildProvider.cs
- BindableTemplateBuilder.cs
- ProviderSettings.cs
- WebColorConverter.cs
- DataServiceHost.cs
- RadioButtonBaseAdapter.cs
- LongValidatorAttribute.cs
- storepermission.cs
- NameSpaceExtractor.cs
- FileDialogPermission.cs
- ComplexPropertyEntry.cs
- DSASignatureDeformatter.cs
- MultilineStringConverter.cs
- ColumnCollection.cs
- XmlBinaryReader.cs
- TripleDESCryptoServiceProvider.cs
- PathNode.cs
- QueryResult.cs
- SmtpAuthenticationManager.cs
- InertiaExpansionBehavior.cs
- Label.cs
- FacetValues.cs
- RecordManager.cs
- ProbeMatchesCD1.cs
- MetabaseServerConfig.cs
- ListDictionaryInternal.cs
- ToolStripArrowRenderEventArgs.cs
- BuildProvider.cs
- Vector.cs
- MessageFormatterConverter.cs
- AggregateNode.cs
- basemetadatamappingvisitor.cs
- CodeGeneratorOptions.cs
- TraceEventCache.cs
- _StreamFramer.cs
- CheckBoxStandardAdapter.cs
- PropertyInfo.cs
- TabItem.cs
- OneOfConst.cs
- AssemblyGen.cs
- MenuRenderer.cs
- HierarchicalDataSourceControl.cs
- ChannelServices.cs
- ToolBarButton.cs
- CopyAction.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- ListItemsCollectionEditor.cs
- LabelEditEvent.cs
- FlowDocumentPaginator.cs
- StringKeyFrameCollection.cs
- PeerDuplexChannelListener.cs
- documentsequencetextview.cs
- SBCSCodePageEncoding.cs
- AudioStateChangedEventArgs.cs
- PropertyMetadata.cs
- ChangeDirector.cs
- SelectorItemAutomationPeer.cs
- TextEditorThreadLocalStore.cs
- DataRowExtensions.cs
- IntegerValidatorAttribute.cs
- SqlCacheDependencySection.cs
- WorkerRequest.cs
- Pair.cs
- SqlClientPermission.cs
- ToolStripItemTextRenderEventArgs.cs
- ResXBuildProvider.cs
- PageAsyncTask.cs
- coordinator.cs
- ObjectDataSourceDisposingEventArgs.cs
- SystemDropShadowChrome.cs
- DataGridPagerStyle.cs
- PartialCachingAttribute.cs