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
- Compilation.cs
- CharacterBuffer.cs
- TimeSpanConverter.cs
- WebPartZone.cs
- NullExtension.cs
- DoubleCollection.cs
- ValueQuery.cs
- filewebrequest.cs
- TextDpi.cs
- ConstructorNeedsTagAttribute.cs
- Error.cs
- SafeProcessHandle.cs
- DataGridViewCheckBoxCell.cs
- SpStreamWrapper.cs
- LogAppendAsyncResult.cs
- GridItem.cs
- HtmlFormWrapper.cs
- exports.cs
- LookupBindingPropertiesAttribute.cs
- PopupRootAutomationPeer.cs
- WebPartDeleteVerb.cs
- ControlCollection.cs
- EntityDataSourceQueryBuilder.cs
- StructuredType.cs
- SafeBuffer.cs
- DataConnectionHelper.cs
- UserUseLicenseDictionaryLoader.cs
- OperationCanceledException.cs
- SessionState.cs
- FunctionMappingTranslator.cs
- _ConnectionGroup.cs
- TableCell.cs
- Size3D.cs
- _ServiceNameStore.cs
- DataGridRelationshipRow.cs
- TemplatePropertyEntry.cs
- Comparer.cs
- RequestTimeoutManager.cs
- ContractNamespaceAttribute.cs
- ImageList.cs
- DataSourceCacheDurationConverter.cs
- QueryRewriter.cs
- WSHttpBindingCollectionElement.cs
- ValueUtilsSmi.cs
- CellIdBoolean.cs
- UnsafeCollabNativeMethods.cs
- PropertyEmitterBase.cs
- ConfigurationSchemaErrors.cs
- ValidationEventArgs.cs
- NumericPagerField.cs
- VectorValueSerializer.cs
- IssuedTokenClientElement.cs
- SystemIcmpV6Statistics.cs
- OleDbInfoMessageEvent.cs
- cache.cs
- Utils.cs
- TextPatternIdentifiers.cs
- ItemMap.cs
- ChannelSinkStacks.cs
- BinaryParser.cs
- ListViewInsertedEventArgs.cs
- XPathDescendantIterator.cs
- ListViewHitTestInfo.cs
- NavigationProgressEventArgs.cs
- DependencyPropertyHelper.cs
- ConstraintCollection.cs
- JpegBitmapEncoder.cs
- OracleFactory.cs
- SafeThreadHandle.cs
- XComponentModel.cs
- JavaScriptObjectDeserializer.cs
- CodeTypeReferenceCollection.cs
- ControlParameter.cs
- FormClosedEvent.cs
- SiteMapNodeItemEventArgs.cs
- DynamicPropertyReader.cs
- SoundPlayer.cs
- PrivateFontCollection.cs
- MatrixTransform3D.cs
- StreamReader.cs
- XmlSchemaIdentityConstraint.cs
- SequenceQuery.cs
- InternalBufferOverflowException.cs
- DateTimeValueSerializerContext.cs
- CompressStream.cs
- DataTableCollection.cs
- FrameAutomationPeer.cs
- IntersectQueryOperator.cs
- Query.cs
- TagMapInfo.cs
- CanonicalFontFamilyReference.cs
- ForEachAction.cs
- WorkflowDesignerMessageFilter.cs
- WebSysDisplayNameAttribute.cs
- InvokeMethodActivityDesigner.cs
- SoapConverter.cs
- Registration.cs
- WebPartPersonalization.cs
- NotifyParentPropertyAttribute.cs
- ThemeDirectoryCompiler.cs