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
- RouteData.cs
- DefaultValueConverter.cs
- XmlArrayAttribute.cs
- _UncName.cs
- InitiatorSessionSymmetricMessageSecurityProtocol.cs
- FixedTextContainer.cs
- MeasurementDCInfo.cs
- XmlObjectSerializerReadContextComplex.cs
- NamespaceMapping.cs
- IteratorFilter.cs
- FixUpCollection.cs
- CompilationLock.cs
- SoapReflectionImporter.cs
- CopyAttributesAction.cs
- SnapLine.cs
- EndpointInfo.cs
- PageContentCollection.cs
- XamlToRtfParser.cs
- Brush.cs
- StatusBarPanelClickEvent.cs
- SqlDelegatedTransaction.cs
- StylesEditorDialog.cs
- GenericAuthenticationEventArgs.cs
- AutomationElementCollection.cs
- ClientBuildManagerCallback.cs
- PropertyChangeTracker.cs
- ListItemViewAttribute.cs
- SelectionProviderWrapper.cs
- ButtonPopupAdapter.cs
- BindingBase.cs
- PackageRelationship.cs
- VisualProxy.cs
- MergePropertyDescriptor.cs
- OleDbRowUpdatedEvent.cs
- TerminatorSinks.cs
- XmlSchemaSimpleContent.cs
- InternalTypeHelper.cs
- SafeLocalMemHandle.cs
- DataRecordInfo.cs
- QilInvoke.cs
- newitemfactory.cs
- ParallelActivityDesigner.cs
- List.cs
- NameValueConfigurationElement.cs
- ACE.cs
- ManagementBaseObject.cs
- ReferenceService.cs
- XmlChildEnumerator.cs
- objectquery_tresulttype.cs
- APCustomTypeDescriptor.cs
- NetworkInterface.cs
- AsyncOperationManager.cs
- ClientSideProviderDescription.cs
- SHA1CryptoServiceProvider.cs
- XmlSchemaComplexContent.cs
- CheckPair.cs
- RoutedEventConverter.cs
- FixedSchema.cs
- PrivilegeNotHeldException.cs
- DataGridHeaderBorder.cs
- KeyboardDevice.cs
- ZipFileInfo.cs
- MetadataUtilsSmi.cs
- StrokeNodeData.cs
- OrderingQueryOperator.cs
- TableRowCollection.cs
- BasicHttpSecurityMode.cs
- CategoryAttribute.cs
- NamespaceQuery.cs
- DeobfuscatingStream.cs
- RangeBase.cs
- RuntimeIdentifierPropertyAttribute.cs
- ComponentCommands.cs
- FormViewCommandEventArgs.cs
- ClientOptions.cs
- TransformedBitmap.cs
- ProtocolsConfiguration.cs
- BitmapMetadataEnumerator.cs
- NullableIntMinMaxAggregationOperator.cs
- tooltip.cs
- DesignerAutoFormatCollection.cs
- InputEventArgs.cs
- ArrayTypeMismatchException.cs
- UserControlFileEditor.cs
- SqlClientFactory.cs
- CodeCommentStatementCollection.cs
- InstanceData.cs
- Unit.cs
- TimeSpanValidatorAttribute.cs
- FileChangesMonitor.cs
- RequestQueryParser.cs
- MaskPropertyEditor.cs
- FileDataSourceCache.cs
- ReferencedCollectionType.cs
- infer.cs
- ScriptComponentDescriptor.cs
- ExceptionWrapper.cs
- DbProviderSpecificTypePropertyAttribute.cs
- LoginName.cs
- ServiceMemoryGates.cs