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
- SessionStateModule.cs
- DataList.cs
- Pair.cs
- Triangle.cs
- Hex.cs
- DbCommandTree.cs
- LinkedResourceCollection.cs
- NetworkInformationPermission.cs
- _NativeSSPI.cs
- RadioButton.cs
- ConnectionsZone.cs
- ErrorsHelper.cs
- FrameAutomationPeer.cs
- TypefaceCollection.cs
- ComPlusContractBehavior.cs
- PowerModeChangedEventArgs.cs
- DataGridRowHeaderAutomationPeer.cs
- OleDbInfoMessageEvent.cs
- DynamicFilterExpression.cs
- TextBoxBase.cs
- _BasicClient.cs
- ChildDocumentBlock.cs
- LinqDataSourceUpdateEventArgs.cs
- ExpressionBuilderCollection.cs
- SecurityHelper.cs
- Select.cs
- PartManifestEntry.cs
- SendMailErrorEventArgs.cs
- Interlocked.cs
- SimpleApplicationHost.cs
- QilTernary.cs
- ManagementInstaller.cs
- TabPageDesigner.cs
- SqlBinder.cs
- Permission.cs
- Msmq4PoisonHandler.cs
- VectorConverter.cs
- PropertyMetadata.cs
- SqlClientWrapperSmiStreamChars.cs
- SourceChangedEventArgs.cs
- DataTableNewRowEvent.cs
- PermissionRequestEvidence.cs
- EditorPart.cs
- PropertyDescriptorComparer.cs
- XPathExpr.cs
- Blend.cs
- SqlFunctionAttribute.cs
- SqlDataSourceStatusEventArgs.cs
- DataGridViewCellStyleContentChangedEventArgs.cs
- SystemWebExtensionsSectionGroup.cs
- HatchBrush.cs
- ValidationErrorCollection.cs
- Button.cs
- LeaseManager.cs
- AppDomainProtocolHandler.cs
- TextElement.cs
- XPathAncestorIterator.cs
- CodeVariableReferenceExpression.cs
- StrokeFIndices.cs
- OdbcDataAdapter.cs
- ParallelTimeline.cs
- FileSystemEventArgs.cs
- OdbcHandle.cs
- DesignerForm.cs
- SrgsItemList.cs
- CancelRequestedRecord.cs
- FormViewInsertEventArgs.cs
- XmlMemberMapping.cs
- GenericsNotImplementedException.cs
- X509SecurityTokenAuthenticator.cs
- GeneralTransformGroup.cs
- DataGridViewBindingCompleteEventArgs.cs
- WebPartMovingEventArgs.cs
- sqlnorm.cs
- LicenseManager.cs
- PreservationFileWriter.cs
- FontFamilyConverter.cs
- InvalidWMPVersionException.cs
- GridEntryCollection.cs
- XmlWrappingReader.cs
- SaveFileDialog.cs
- Clause.cs
- InfocardChannelParameter.cs
- WorkflowQueueInfo.cs
- XmlSchemaAttribute.cs
- coordinator.cs
- InlinedAggregationOperatorEnumerator.cs
- CollectionViewGroupInternal.cs
- EnumerableCollectionView.cs
- X509Extension.cs
- UnhandledExceptionEventArgs.cs
- DSASignatureFormatter.cs
- XmlFormatExtensionPointAttribute.cs
- TextElementCollectionHelper.cs
- XmlnsPrefixAttribute.cs
- MaskedTextBoxTextEditor.cs
- ParameterRefs.cs
- DefaultSection.cs
- UnsafeNativeMethods.cs
- InteropAutomationProvider.cs