Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WCF / IdentityModel / System / IdentityModel / Tokens / SecurityKeyIdentifierClause.cs / 1305376 / SecurityKeyIdentifierClause.cs
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------
namespace System.IdentityModel.Tokens
{
// All subclasses are required to be thread-safe and immutable
// Self-resolving clauses such as RSA and X509 raw data should
// override CanCreateKey and return true, and implement
// CreateKey()
public abstract class SecurityKeyIdentifierClause
{
readonly string clauseType;
byte[] derivationNonce;
int derivationLength;
protected SecurityKeyIdentifierClause(string clauseType)
: this(clauseType, null, 0)
{
}
protected SecurityKeyIdentifierClause(string clauseType, byte[] nonce, int length)
{
this.clauseType = clauseType;
this.derivationNonce = nonce;
this.derivationLength = length;
}
public virtual bool CanCreateKey
{
get { return false; }
}
public string ClauseType
{
get { return this.clauseType; }
}
public virtual SecurityKey CreateKey()
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotSupportedException(SR.GetString(SR.KeyIdentifierClauseDoesNotSupportKeyCreation)));
}
public virtual bool Matches(SecurityKeyIdentifierClause keyIdentifierClause)
{
return ReferenceEquals(this, keyIdentifierClause);
}
public byte[] GetDerivationNonce()
{
return (this.derivationNonce != null) ? (byte[])this.derivationNonce.Clone() : null;
}
public int DerivationLength
{
get { return this.derivationLength; }
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DataViewSettingCollection.cs
- RegexCompiler.cs
- MatrixCamera.cs
- EntityDescriptor.cs
- ContainsSearchOperator.cs
- XmlDataSourceView.cs
- ClientFormsIdentity.cs
- VariableDesigner.xaml.cs
- CancellationTokenSource.cs
- TraceHandler.cs
- Invariant.cs
- EmptyControlCollection.cs
- Viewport3DAutomationPeer.cs
- TaskFactory.cs
- ErrorBehavior.cs
- PositiveTimeSpanValidatorAttribute.cs
- RegexTree.cs
- Transform3D.cs
- SecurityManager.cs
- NoPersistHandle.cs
- NTAccount.cs
- CacheOutputQuery.cs
- ByteAnimationBase.cs
- WebEventTraceProvider.cs
- XmlObjectSerializerReadContext.cs
- TypeBuilderInstantiation.cs
- IndexerNameAttribute.cs
- GetBrowserTokenRequest.cs
- SequentialUshortCollection.cs
- UnknownBitmapDecoder.cs
- PerCallInstanceContextProvider.cs
- CheckBoxBaseAdapter.cs
- TdsParserHelperClasses.cs
- ComponentGuaranteesAttribute.cs
- SiteMapNodeCollection.cs
- VersionedStreamOwner.cs
- XmlParserContext.cs
- PtsHost.cs
- SecurityDocument.cs
- PathBox.cs
- CultureInfoConverter.cs
- XmlDictionaryReaderQuotas.cs
- CSharpCodeProvider.cs
- ThreadStaticAttribute.cs
- WizardSideBarListControlItemEventArgs.cs
- SplitContainer.cs
- DiagnosticTrace.cs
- RectangleGeometry.cs
- SqlCacheDependencyDatabase.cs
- BindingsCollection.cs
- CryptoKeySecurity.cs
- ResourceReferenceExpression.cs
- _DomainName.cs
- IgnoreSectionHandler.cs
- TextTreeInsertElementUndoUnit.cs
- ListSortDescriptionCollection.cs
- AbandonedMutexException.cs
- DesignTimeTemplateParser.cs
- KeyGestureValueSerializer.cs
- PreviewPrintController.cs
- KeyPressEvent.cs
- MultiTrigger.cs
- PixelFormats.cs
- InputLanguageSource.cs
- BitSet.cs
- ClientUtils.cs
- StrongNameMembershipCondition.cs
- PermissionRequestEvidence.cs
- EdmRelationshipNavigationPropertyAttribute.cs
- RuleInfoComparer.cs
- ReflectionServiceProvider.cs
- ResourceExpressionBuilder.cs
- XhtmlConformanceSection.cs
- BitmapFrameEncode.cs
- LogicalExpr.cs
- SrgsOneOf.cs
- XmlQualifiedNameTest.cs
- InteropAutomationProvider.cs
- TabItem.cs
- SystemColors.cs
- Collection.cs
- SqlMetaData.cs
- ExtensionElementCollection.cs
- ThrowHelper.cs
- DllNotFoundException.cs
- DeadCharTextComposition.cs
- KeyboardNavigation.cs
- ResXResourceReader.cs
- PropertyMapper.cs
- EventListener.cs
- URLMembershipCondition.cs
- XmlSchemaFacet.cs
- TerminateSequenceResponse.cs
- RelationshipEntry.cs
- TrackingServices.cs
- ApplicationSecurityInfo.cs
- MemoryPressure.cs
- SubMenuStyle.cs
- DeleteMemberBinder.cs
- NavigatingCancelEventArgs.cs