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
- LicenseManager.cs
- EffectiveValueEntry.cs
- ObjectHelper.cs
- TemplatePropertyEntry.cs
- InkCanvasFeedbackAdorner.cs
- TaskFileService.cs
- DockProviderWrapper.cs
- SqlConnectionStringBuilder.cs
- StorageComplexPropertyMapping.cs
- clipboard.cs
- WorkflowMarkupSerializationProvider.cs
- ListViewCancelEventArgs.cs
- ItemsControl.cs
- FederatedMessageSecurityOverHttpElement.cs
- ChangeProcessor.cs
- httpstaticobjectscollection.cs
- DefaultEventAttribute.cs
- MissingMemberException.cs
- EmptyEnumerator.cs
- DatagridviewDisplayedBandsData.cs
- TemplateAction.cs
- SendAgentStatusRequest.cs
- AttributeInfo.cs
- AmbientValueAttribute.cs
- BitmapEffectInput.cs
- ApplyTemplatesAction.cs
- TimelineGroup.cs
- ActivityExecutionFilter.cs
- ContentWrapperAttribute.cs
- TreeViewItemAutomationPeer.cs
- RowUpdatedEventArgs.cs
- util.cs
- SafeViewOfFileHandle.cs
- ServiceProviders.cs
- ComPlusTraceRecord.cs
- LassoHelper.cs
- PreloadedPackages.cs
- GroupDescription.cs
- Propagator.ExtentPlaceholderCreator.cs
- CharacterHit.cs
- ToolStripItemDataObject.cs
- BoolExpressionVisitors.cs
- CodeAttributeArgument.cs
- KnownTypesProvider.cs
- DefaultValidator.cs
- XmlBinaryReader.cs
- CodeGenerator.cs
- DeferredReference.cs
- Rights.cs
- DelegateBodyWriter.cs
- ReflectionUtil.cs
- COM2Properties.cs
- QueryAccessibilityHelpEvent.cs
- LogicalChannelCollection.cs
- NestedContainer.cs
- GB18030Encoding.cs
- GridToolTip.cs
- RecognizeCompletedEventArgs.cs
- OLEDB_Util.cs
- RadioButtonBaseAdapter.cs
- HtmlTextArea.cs
- Attachment.cs
- BitStack.cs
- PathFigureCollectionConverter.cs
- RSAPKCS1SignatureDeformatter.cs
- DataPagerFieldItem.cs
- DefaultObjectSerializer.cs
- ArrayItemReference.cs
- SyndicationFeed.cs
- ToolStripItem.cs
- WebRequest.cs
- _LazyAsyncResult.cs
- Binding.cs
- DataGridViewImageCell.cs
- Preprocessor.cs
- ChtmlFormAdapter.cs
- TargetInvocationException.cs
- TreeNodeClickEventArgs.cs
- ValidationError.cs
- ValidatingReaderNodeData.cs
- FileSystemWatcher.cs
- ToolStripItemClickedEventArgs.cs
- InlineCollection.cs
- AssemblyAssociatedContentFileAttribute.cs
- MsmqProcessProtocolHandler.cs
- Vector.cs
- AnimationTimeline.cs
- TreeViewImageKeyConverter.cs
- APCustomTypeDescriptor.cs
- LicenseContext.cs
- ToolboxItemCollection.cs
- OperatorExpressions.cs
- SuppressMessageAttribute.cs
- DataServiceProcessingPipelineEventArgs.cs
- FrameworkContentElementAutomationPeer.cs
- PrtCap_Reader.cs
- MemberRelationshipService.cs
- DependencyPropertyValueSerializer.cs
- SrgsGrammarCompiler.cs
- Nullable.cs