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
- TextFormatterImp.cs
- IPPacketInformation.cs
- MobileFormsAuthentication.cs
- TextParagraphProperties.cs
- RegularExpressionValidator.cs
- BaseValidator.cs
- ConfigurationLocation.cs
- ProfileSettings.cs
- ISAPIRuntime.cs
- HostingEnvironmentWrapper.cs
- XsdDateTime.cs
- BinaryExpression.cs
- XmlSchemaExternal.cs
- LayoutDump.cs
- Win32KeyboardDevice.cs
- BooleanSwitch.cs
- WS2007FederationHttpBindingCollectionElement.cs
- Track.cs
- FormViewRow.cs
- XmlSerializer.cs
- ListViewTableRow.cs
- SubMenuStyle.cs
- MouseGestureValueSerializer.cs
- SqlBulkCopyColumnMapping.cs
- TextEndOfLine.cs
- BamlRecords.cs
- CompositeFontInfo.cs
- SmtpCommands.cs
- DesignerUtility.cs
- UnhandledExceptionEventArgs.cs
- XslVisitor.cs
- MouseActionValueSerializer.cs
- PrincipalPermission.cs
- X509CertificateTrustedIssuerElement.cs
- ConfigViewGenerator.cs
- MasterPage.cs
- UserInitiatedRoutedEventPermission.cs
- EntityCollectionChangedParams.cs
- WebConfigurationFileMap.cs
- GradientBrush.cs
- ActiveXHost.cs
- RemoteWebConfigurationHost.cs
- ArrayMergeHelper.cs
- MasterPageCodeDomTreeGenerator.cs
- NativeMethods.cs
- StylusDownEventArgs.cs
- Buffer.cs
- AsyncResult.cs
- BinaryMethodMessage.cs
- DataContractSerializerOperationGenerator.cs
- DrawToolTipEventArgs.cs
- ColumnTypeConverter.cs
- IISMapPath.cs
- TdsParameterSetter.cs
- JsonFormatGeneratorStatics.cs
- UnmanagedMemoryStream.cs
- StyleSelector.cs
- ListBoxChrome.cs
- PermissionSet.cs
- SubstitutionList.cs
- DirtyTextRange.cs
- _SslStream.cs
- DispatcherExceptionEventArgs.cs
- HttpValueCollection.cs
- PolyBezierSegment.cs
- WorkflowMarkupElementEventArgs.cs
- ActivityTrace.cs
- SystemIPInterfaceProperties.cs
- SqlInfoMessageEvent.cs
- BookmarkScope.cs
- QilPatternVisitor.cs
- GacUtil.cs
- CLSCompliantAttribute.cs
- CategoryGridEntry.cs
- Vector3DConverter.cs
- BaseDataListComponentEditor.cs
- Point3DConverter.cs
- AutomationPattern.cs
- Debugger.cs
- EditorAttribute.cs
- _SingleItemRequestCache.cs
- OutputCacheProfile.cs
- ProxyRpc.cs
- SqlConnectionStringBuilder.cs
- IsolatedStoragePermission.cs
- ConsoleKeyInfo.cs
- AttributeProviderAttribute.cs
- XmlSchemaExporter.cs
- XPathNodeList.cs
- ImageMetadata.cs
- StylusPointPropertyInfo.cs
- HttpApplicationStateWrapper.cs
- OracleParameterCollection.cs
- Ipv6Element.cs
- StylusTip.cs
- XmlSchemaSimpleTypeRestriction.cs
- SqlDataSourceFilteringEventArgs.cs
- CompoundFileStreamReference.cs
- assertwrapper.cs
- Context.cs