Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Security / BinarySecretKeyIdentifierClause.cs / 1 / BinarySecretKeyIdentifierClause.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel.Security { using System.IdentityModel.Tokens; using System.ServiceModel; using System.ServiceModel.Security.Tokens; public class BinarySecretKeyIdentifierClause : BinaryKeyIdentifierClause { InMemorySymmetricSecurityKey symmetricKey; public BinarySecretKeyIdentifierClause(byte[] key) : this(key, true) { } public BinarySecretKeyIdentifierClause(byte[] key, bool cloneBuffer) : this(key, cloneBuffer, null, 0) { } public BinarySecretKeyIdentifierClause(byte[] key, bool cloneBuffer, byte[] derivationNonce, int derivationLength) : base(XD.TrustFeb2005Dictionary.BinarySecretClauseType.Value, key, cloneBuffer, derivationNonce, derivationLength) { } public byte[] GetKeyBytes() { return GetBuffer(); } public override bool CanCreateKey { get { return true; } } public override SecurityKey CreateKey() { if (this.symmetricKey == null) this.symmetricKey = new InMemorySymmetricSecurityKey(GetBuffer(), false); return this.symmetricKey; } public override bool Matches(SecurityKeyIdentifierClause keyIdentifierClause) { BinarySecretKeyIdentifierClause that = keyIdentifierClause as BinarySecretKeyIdentifierClause; // PreSharp Bug: Parameter 'that' to this public method must be validated: A null-dereference can occur here. #pragma warning suppress 56506 return ReferenceEquals(this, that) || (that != null && that.Matches(this.GetRawBuffer())); } } } // 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
- TreeSet.cs
- CodeIterationStatement.cs
- IndentTextWriter.cs
- AttributeEmitter.cs
- WebService.cs
- UserControl.cs
- TransformGroup.cs
- ping.cs
- RegexStringValidator.cs
- OutOfProcStateClientManager.cs
- _AutoWebProxyScriptWrapper.cs
- WebPartHelpVerb.cs
- DBAsyncResult.cs
- ChannelTerminatedException.cs
- ConditionCollection.cs
- HtmlImage.cs
- ItemCheckedEvent.cs
- SqlUserDefinedAggregateAttribute.cs
- Nullable.cs
- Mouse.cs
- ObjectItemConventionAssemblyLoader.cs
- StylusPointPropertyUnit.cs
- XmlElementList.cs
- ChameleonKey.cs
- ApplicationServiceManager.cs
- DbConnectionClosed.cs
- Byte.cs
- DetailsView.cs
- ExpressionVisitorHelpers.cs
- DataGridViewRow.cs
- RuntimeConfig.cs
- DescendantOverDescendantQuery.cs
- PassportAuthenticationModule.cs
- AnyReturnReader.cs
- LoginUtil.cs
- WrapPanel.cs
- ProviderException.cs
- DbConnectionPoolCounters.cs
- TraceUtils.cs
- VerticalAlignConverter.cs
- Italic.cs
- SQLBytesStorage.cs
- EventBuilder.cs
- X509PeerCertificateElement.cs
- StrongTypingException.cs
- HtmlImage.cs
- DeferrableContent.cs
- PropertyToken.cs
- EventDrivenDesigner.cs
- DbConnectionPoolOptions.cs
- ExpressionEditorAttribute.cs
- CompositeScriptReferenceEventArgs.cs
- XPathExpr.cs
- _IPv6Address.cs
- PipeStream.cs
- CollectionDataContractAttribute.cs
- EventsTab.cs
- ComponentEditorForm.cs
- GridViewCommandEventArgs.cs
- TrackingMemoryStream.cs
- VisualStyleInformation.cs
- SeekableReadStream.cs
- HttpModulesSection.cs
- SQLInt32Storage.cs
- StatusBarItem.cs
- XmlSchemaSet.cs
- DependencyPropertyConverter.cs
- Oid.cs
- FrameSecurityDescriptor.cs
- RegexTree.cs
- TabControlToolboxItem.cs
- FontStyles.cs
- ModuleConfigurationInfo.cs
- ChangeProcessor.cs
- ObjectItemLoadingSessionData.cs
- SecurityDocument.cs
- ViewRendering.cs
- OdbcConnectionStringbuilder.cs
- StringFreezingAttribute.cs
- NavigationCommands.cs
- SqlGenericUtil.cs
- StateBag.cs
- ObjectListDesigner.cs
- LinqDataSourceHelper.cs
- Activator.cs
- TemplateBindingExpression.cs
- WebResourceUtil.cs
- ModelService.cs
- WorkflowRuntimeServiceElement.cs
- UnhandledExceptionEventArgs.cs
- AutomationProperties.cs
- HtmlPanelAdapter.cs
- SmtpLoginAuthenticationModule.cs
- RSAOAEPKeyExchangeDeformatter.cs
- XdrBuilder.cs
- HotSpotCollection.cs
- PropertyTabAttribute.cs
- PowerEase.cs
- DispatcherHookEventArgs.cs
- XmlTextReaderImpl.cs