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
- CustomSignedXml.cs
- SqlError.cs
- KnowledgeBase.cs
- PageThemeCodeDomTreeGenerator.cs
- SelectionPattern.cs
- ObjectDataSourceStatusEventArgs.cs
- QilVisitor.cs
- CompModSwitches.cs
- Helpers.cs
- DecoderExceptionFallback.cs
- TemplateControl.cs
- DescendantOverDescendantQuery.cs
- PermissionRequestEvidence.cs
- StyleTypedPropertyAttribute.cs
- XhtmlCssHandler.cs
- DesignSurfaceServiceContainer.cs
- TreeNode.cs
- CultureSpecificStringDictionary.cs
- OleDbWrapper.cs
- SecurityManager.cs
- SizeF.cs
- ServiceCredentials.cs
- StateMachineDesignerPaint.cs
- PersistStreamTypeWrapper.cs
- DiscriminatorMap.cs
- XPathNodeHelper.cs
- SqlMethods.cs
- ExpressionBuilderCollection.cs
- DictionaryContent.cs
- StringReader.cs
- TdsParserHelperClasses.cs
- TextServicesCompartmentEventSink.cs
- WindowsScrollBar.cs
- ModuleBuilder.cs
- KeyTimeConverter.cs
- NumericUpDownAcceleration.cs
- ToolStripSplitStackLayout.cs
- EncryptedReference.cs
- SplitterCancelEvent.cs
- Grid.cs
- LineGeometry.cs
- TextEditorCopyPaste.cs
- Int32CollectionValueSerializer.cs
- TypeResolver.cs
- Module.cs
- PreviewKeyDownEventArgs.cs
- XmlSchemaSimpleTypeList.cs
- ToolStripDropDownItem.cs
- RowVisual.cs
- TemplateBuilder.cs
- WizardSideBarListControlItemEventArgs.cs
- SaveWorkflowCommand.cs
- CodeArrayIndexerExpression.cs
- HTMLTextWriter.cs
- LongSumAggregationOperator.cs
- WebPartEditorApplyVerb.cs
- SelectionEditingBehavior.cs
- BuildResultCache.cs
- TypeBuilderInstantiation.cs
- ProfileGroupSettings.cs
- RowBinding.cs
- ParameterCollection.cs
- DesignerSerializationVisibilityAttribute.cs
- DetailsViewInsertEventArgs.cs
- DocumentXPathNavigator.cs
- MenuItem.cs
- SQLDecimal.cs
- TypefaceMetricsCache.cs
- HttpAsyncResult.cs
- ContextQuery.cs
- ByteStack.cs
- WindowsScroll.cs
- MachineKeySection.cs
- InstanceHandleReference.cs
- RowsCopiedEventArgs.cs
- SystemBrushes.cs
- Configuration.cs
- CopyAttributesAction.cs
- TextServicesCompartmentEventSink.cs
- PolyLineSegment.cs
- ScalarConstant.cs
- NativeCppClassAttribute.cs
- EventLogPermissionEntryCollection.cs
- CodePrimitiveExpression.cs
- TextBoxAutoCompleteSourceConverter.cs
- PhonemeConverter.cs
- SqlConnectionString.cs
- VirtualPath.cs
- XmlAttribute.cs
- TransformCollection.cs
- WebPartActionVerb.cs
- EntryWrittenEventArgs.cs
- HandleRef.cs
- WmlTextBoxAdapter.cs
- LoadedOrUnloadedOperation.cs
- Model3DCollection.cs
- PeerApplicationLaunchInfo.cs
- FileVersionInfo.cs
- JsonServiceDocumentSerializer.cs
- EntityCollection.cs