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
- StopStoryboard.cs
- MemberHolder.cs
- DesigntimeLicenseContextSerializer.cs
- BitmapEffectGroup.cs
- ColorInterpolationModeValidation.cs
- DesignerLoader.cs
- TextReader.cs
- WebUtil.cs
- EntityRecordInfo.cs
- DataObject.cs
- ControlCommandSet.cs
- ScriptResourceAttribute.cs
- HtmlPhoneCallAdapter.cs
- XmlComplianceUtil.cs
- PrintDialog.cs
- DataGridViewRowEventArgs.cs
- VisualBrush.cs
- CLSCompliantAttribute.cs
- ClickablePoint.cs
- TransformValueSerializer.cs
- BinaryReader.cs
- MethodImplAttribute.cs
- GeneralTransform.cs
- IndexingContentUnit.cs
- EncoderParameters.cs
- EntityContainerEntitySetDefiningQuery.cs
- ProfileGroupSettingsCollection.cs
- DataGridViewCheckBoxColumn.cs
- Workspace.cs
- StrokeCollection2.cs
- EnterpriseServicesHelper.cs
- AsnEncodedData.cs
- VisualTarget.cs
- RotationValidation.cs
- SafeNativeMethods.cs
- SwitchLevelAttribute.cs
- GeneralTransform3DCollection.cs
- ResourcesBuildProvider.cs
- AmbiguousMatchException.cs
- TextProviderWrapper.cs
- TextTreeInsertElementUndoUnit.cs
- ToolboxComponentsCreatingEventArgs.cs
- UpdatePanel.cs
- XmlSchemaAttributeGroupRef.cs
- SyndicationSerializer.cs
- XpsImageSerializationService.cs
- TimeSpanOrInfiniteValidator.cs
- Attributes.cs
- ResetableIterator.cs
- DataGridViewRowCancelEventArgs.cs
- WebEventTraceProvider.cs
- XPathNodeInfoAtom.cs
- SecondaryIndexDefinition.cs
- ContainerFilterService.cs
- DecoratedNameAttribute.cs
- HebrewCalendar.cs
- DataRelationCollection.cs
- WebZone.cs
- WindowsSolidBrush.cs
- DataReaderContainer.cs
- WebPartCloseVerb.cs
- NameValueConfigurationElement.cs
- EntityModelBuildProvider.cs
- SerializationHelper.cs
- ThreadNeutralSemaphore.cs
- MenuItemStyleCollection.cs
- MsmqMessageSerializationFormat.cs
- TextContainerChangeEventArgs.cs
- SapiRecoContext.cs
- PersistenceException.cs
- HostProtectionException.cs
- RemoveStoryboard.cs
- MemoryStream.cs
- DuplicateWaitObjectException.cs
- GridLength.cs
- Point3DCollection.cs
- DataGridViewComboBoxCell.cs
- ToolStripPanelRenderEventArgs.cs
- SoapAttributes.cs
- HttpDictionary.cs
- TimerEventSubscriptionCollection.cs
- OdbcError.cs
- _Semaphore.cs
- updatecommandorderer.cs
- QilTernary.cs
- DesignTimeParseData.cs
- RowsCopiedEventArgs.cs
- DesignerActionVerbItem.cs
- MatrixValueSerializer.cs
- ToolBarButtonClickEvent.cs
- TextTreePropertyUndoUnit.cs
- OutKeywords.cs
- CheckedPointers.cs
- QilBinary.cs
- FacetDescriptionElement.cs
- DataMemberListEditor.cs
- FieldBuilder.cs
- CapabilitiesRule.cs
- StateWorkerRequest.cs
- ReflectionUtil.cs