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
- Peer.cs
- Content.cs
- ErrorFormatter.cs
- XmlNotation.cs
- SecurityHeaderTokenResolver.cs
- CopyAction.cs
- IssuanceLicense.cs
- StringUtil.cs
- DataMemberConverter.cs
- SelectionGlyphBase.cs
- ToolStripSplitButton.cs
- HttpsChannelFactory.cs
- ColorAnimationUsingKeyFrames.cs
- ListInitExpression.cs
- BaseDataList.cs
- EdmScalarPropertyAttribute.cs
- DeploymentExceptionMapper.cs
- ButtonFieldBase.cs
- BooleanAnimationUsingKeyFrames.cs
- XmlParserContext.cs
- EventToken.cs
- PropertyTab.cs
- DbUpdateCommandTree.cs
- Transform.cs
- ViewValidator.cs
- GeneralTransform.cs
- FieldReference.cs
- XmlAnyElementAttribute.cs
- DataBindingCollection.cs
- SQLBinaryStorage.cs
- GACIdentityPermission.cs
- ComboBoxHelper.cs
- Material.cs
- SmiEventSink.cs
- ClientRuntimeConfig.cs
- QilLiteral.cs
- ProxyAttribute.cs
- _ProxyChain.cs
- CompilationLock.cs
- PermissionRequestEvidence.cs
- ConfigurationValue.cs
- SelectionChangedEventArgs.cs
- Panel.cs
- GeneralTransform3D.cs
- Quaternion.cs
- ManagedIStream.cs
- CompoundFileReference.cs
- TypeLoadException.cs
- oledbmetadatacolumnnames.cs
- Metadata.cs
- ThicknessAnimationUsingKeyFrames.cs
- _UncName.cs
- InlineObject.cs
- BlurBitmapEffect.cs
- BamlResourceDeserializer.cs
- ApplicationManager.cs
- Or.cs
- XmlCharCheckingWriter.cs
- Storyboard.cs
- RadioButtonAutomationPeer.cs
- DynamicRendererThreadManager.cs
- DataGridViewRowsAddedEventArgs.cs
- AnimatedTypeHelpers.cs
- TreeWalker.cs
- PerSessionInstanceContextProvider.cs
- LinkedResource.cs
- DrawingGroupDrawingContext.cs
- Label.cs
- PageSettings.cs
- PeerContact.cs
- XmlIgnoreAttribute.cs
- ComponentCollection.cs
- JsonQNameDataContract.cs
- PersonalizationEntry.cs
- MatrixTransform3D.cs
- SID.cs
- RequestQueue.cs
- QueryCacheManager.cs
- _NtlmClient.cs
- ProfileEventArgs.cs
- DependsOnAttribute.cs
- SpoolingTask.cs
- DelegatedStream.cs
- NamedElement.cs
- Converter.cs
- PackWebRequest.cs
- ServiceChannelManager.cs
- EnumType.cs
- ContextBase.cs
- MsmqIntegrationAppDomainProtocolHandler.cs
- ConnectionPoolManager.cs
- SQLGuid.cs
- RTLAwareMessageBox.cs
- ACE.cs
- GeneralTransformCollection.cs
- SafeCryptContextHandle.cs
- SearchExpression.cs
- SoapObjectWriter.cs
- EntityDataSourceDesigner.cs
- UInt64Converter.cs