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
- XmlSecureResolver.cs
- GridEntry.cs
- ResourceExpression.cs
- ColorInterpolationModeValidation.cs
- CodeFieldReferenceExpression.cs
- RowTypeElement.cs
- ExpressionBinding.cs
- SystemWebCachingSectionGroup.cs
- SharedUtils.cs
- StorageConditionPropertyMapping.cs
- ColumnMapVisitor.cs
- DispatcherHookEventArgs.cs
- ExceptionUtil.cs
- VScrollProperties.cs
- SqlLiftIndependentRowExpressions.cs
- __ConsoleStream.cs
- ProviderException.cs
- ListViewTableCell.cs
- ErrorWebPart.cs
- SignedInfo.cs
- ScriptBehaviorDescriptor.cs
- TypeConverterHelper.cs
- SqlIdentifier.cs
- MemoryFailPoint.cs
- GridViewUpdateEventArgs.cs
- PathHelper.cs
- TextCollapsingProperties.cs
- PlanCompiler.cs
- ValueTypeFixupInfo.cs
- CmsInterop.cs
- ComponentConverter.cs
- DataRowChangeEvent.cs
- SqlConnectionString.cs
- AnchorEditor.cs
- PropertiesTab.cs
- DataSourceXmlTextReader.cs
- sqlstateclientmanager.cs
- Selector.cs
- Set.cs
- MatrixAnimationUsingPath.cs
- Baml6ConstructorInfo.cs
- TextBox.cs
- COM2ExtendedTypeConverter.cs
- GridViewHeaderRowPresenter.cs
- DesignTimeTemplateParser.cs
- FlagsAttribute.cs
- PartialArray.cs
- FunctionDescription.cs
- BoundField.cs
- UInt32Storage.cs
- ApplicationManager.cs
- MethodExpr.cs
- MouseOverProperty.cs
- ConfigXmlDocument.cs
- SqlBulkCopy.cs
- SHA1.cs
- SqlConnectionString.cs
- IHttpResponseInternal.cs
- ModuleBuilderData.cs
- PeerDuplexChannel.cs
- ProgressPage.cs
- ZipIOLocalFileBlock.cs
- State.cs
- AppDomainManager.cs
- UnknownWrapper.cs
- MimeParameterWriter.cs
- StackOverflowException.cs
- PageAsyncTaskManager.cs
- Parameter.cs
- PolyLineSegmentFigureLogic.cs
- PrintDocument.cs
- SiteMapNodeItem.cs
- Sql8ExpressionRewriter.cs
- XmlSchemaDocumentation.cs
- EFColumnProvider.cs
- SubpageParaClient.cs
- PageBreakRecord.cs
- ContainerControl.cs
- OleDbConnectionFactory.cs
- LifetimeServices.cs
- ColorKeyFrameCollection.cs
- Matrix3D.cs
- PlatformCulture.cs
- CookieHandler.cs
- DeviceContexts.cs
- BuildProviderAppliesToAttribute.cs
- ByteArrayHelperWithString.cs
- StrokeDescriptor.cs
- WindowsFormsLinkLabel.cs
- SqlProviderManifest.cs
- AttributeCollection.cs
- GuidTagList.cs
- InterleavedZipPartStream.cs
- CDSsyncETWBCLProvider.cs
- SupportsEventValidationAttribute.cs
- Helper.cs
- XamlTemplateSerializer.cs
- TextReader.cs
- PackWebResponse.cs
- PixelShader.cs