Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / IdentityModel / System / IdentityModel / Tokens / X509ThumbprintKeyIdentifierClause.cs / 1 / X509ThumbprintKeyIdentifierClause.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.IdentityModel.Tokens { using System.Globalization; using System.Security.Cryptography.X509Certificates; public class X509ThumbprintKeyIdentifierClause : BinaryKeyIdentifierClause { public X509ThumbprintKeyIdentifierClause(X509Certificate2 certificate) : this(GetHash(certificate), false) { } public X509ThumbprintKeyIdentifierClause(byte[] thumbprint) : this(thumbprint, true) { } internal X509ThumbprintKeyIdentifierClause(byte[] thumbprint, bool cloneBuffer) : base(null, thumbprint, cloneBuffer) { } static byte[] GetHash(X509Certificate2 certificate) { if (certificate == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("certificate"); return certificate.GetCertHash(); } public byte[] GetX509Thumbprint() { return GetBuffer(); } public bool Matches(X509Certificate2 certificate) { if (certificate == null) return false; return Matches(GetHash(certificate)); } public override string ToString() { return string.Format(CultureInfo.InvariantCulture, "X509ThumbprintKeyIdentifierClause(Hash = 0x{0})", ToHexString()); } } } // 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
- UIPermission.cs
- XmlSchemaValidator.cs
- UniformGrid.cs
- listviewsubitemcollectioneditor.cs
- QueryResponse.cs
- sqlnorm.cs
- CompleteWizardStep.cs
- NameValueCollection.cs
- MLangCodePageEncoding.cs
- LinearGradientBrush.cs
- ResourceDisplayNameAttribute.cs
- IISUnsafeMethods.cs
- MethodImplAttribute.cs
- ToolStripButton.cs
- DataGridTextBoxColumn.cs
- XAMLParseException.cs
- ListBindableAttribute.cs
- SHA1CryptoServiceProvider.cs
- clipboard.cs
- XmlReflectionImporter.cs
- ElementNotEnabledException.cs
- DataPager.cs
- RoutedEventValueSerializer.cs
- InternalCache.cs
- ImageDrawing.cs
- HelloMessage11.cs
- OrthographicCamera.cs
- MethodRental.cs
- TransactionManager.cs
- SqlProviderServices.cs
- WithStatement.cs
- RequestCachePolicy.cs
- CircleHotSpot.cs
- OracleConnectionString.cs
- Stackframe.cs
- InternalResources.cs
- ParsedAttributeCollection.cs
- ConditionalExpression.cs
- BuildResult.cs
- TextServicesLoader.cs
- ImageListDesigner.cs
- IDispatchConstantAttribute.cs
- ItemsControl.cs
- SettingsPropertyValue.cs
- UseLicense.cs
- CodeValidator.cs
- WrapPanel.cs
- EndSelectCardRequest.cs
- SapiAttributeParser.cs
- ProviderConnectionPoint.cs
- ProtectedConfigurationSection.cs
- ArrangedElementCollection.cs
- QilVisitor.cs
- DataContractSerializerOperationBehavior.cs
- EventEntry.cs
- XomlCompilerResults.cs
- SafeFileHandle.cs
- TemplateBaseAction.cs
- CachedRequestParams.cs
- _SslState.cs
- QuaternionKeyFrameCollection.cs
- MutexSecurity.cs
- _NTAuthentication.cs
- EventLogTraceListener.cs
- FormViewInsertedEventArgs.cs
- XPathBuilder.cs
- FontStyleConverter.cs
- XmlMapping.cs
- ICspAsymmetricAlgorithm.cs
- AutoResizedEvent.cs
- IPipelineRuntime.cs
- FastPropertyAccessor.cs
- RefreshInfo.cs
- SqlCommand.cs
- HiddenFieldPageStatePersister.cs
- EditCommandColumn.cs
- PropertyValueChangedEvent.cs
- ApplicationFileParser.cs
- RegexCharClass.cs
- XmlQueryType.cs
- WebSysDisplayNameAttribute.cs
- BevelBitmapEffect.cs
- InvokeMemberBinder.cs
- EdmToObjectNamespaceMap.cs
- ServiceReflector.cs
- GlobalDataBindingHandler.cs
- _Events.cs
- XmlSchemaNotation.cs
- TypeHelpers.cs
- RootBrowserWindowAutomationPeer.cs
- TextSelection.cs
- Predicate.cs
- FixedBufferAttribute.cs
- XmlAttributeCollection.cs
- Win32.cs
- ImmutableAssemblyCacheEntry.cs
- BufferAllocator.cs
- SimpleBitVector32.cs
- validationstate.cs
- XslVisitor.cs