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
- ShapeTypeface.cs
- DBProviderConfigurationHandler.cs
- DesignerDataColumn.cs
- XmlAttributeProperties.cs
- CodeArrayIndexerExpression.cs
- InternalsVisibleToAttribute.cs
- TaiwanCalendar.cs
- ListViewGroup.cs
- WeakHashtable.cs
- FormsAuthenticationUserCollection.cs
- RightsManagementEncryptedStream.cs
- DynamicQueryableWrapper.cs
- DynamicControlParameter.cs
- AppSettingsSection.cs
- CompressedStack.cs
- ReversePositionQuery.cs
- EditingCoordinator.cs
- WorkflowElementDialog.cs
- HiddenFieldPageStatePersister.cs
- DataGridViewRow.cs
- DesignRelation.cs
- SqlDataSourceConfigureSelectPanel.cs
- DocumentSequence.cs
- TextCompositionManager.cs
- XmlChildEnumerator.cs
- LocalServiceSecuritySettings.cs
- ExtentCqlBlock.cs
- DataGridTablesFactory.cs
- CharUnicodeInfo.cs
- Atom10FormatterFactory.cs
- AsyncResult.cs
- DataList.cs
- brushes.cs
- Constants.cs
- IdentityReference.cs
- GenerateTemporaryTargetAssembly.cs
- Lock.cs
- SystemBrushes.cs
- _FtpDataStream.cs
- SQLRoleProvider.cs
- CodeMethodReturnStatement.cs
- IntSecurity.cs
- ProvidersHelper.cs
- XAMLParseException.cs
- PathFigureCollection.cs
- TemplateContent.cs
- ActiveXHelper.cs
- ReverseComparer.cs
- ScrollChrome.cs
- CreateUserWizard.cs
- MenuStrip.cs
- HuffCodec.cs
- LowerCaseStringConverter.cs
- GridPattern.cs
- PersistenceProviderDirectory.cs
- RequiredFieldValidator.cs
- ScaleTransform.cs
- MD5CryptoServiceProvider.cs
- Dispatcher.cs
- DataMisalignedException.cs
- ObjectDataSourceDesigner.cs
- LineInfo.cs
- DesignTable.cs
- TextProperties.cs
- Ops.cs
- QueryStoreStatusRequest.cs
- BehaviorDragDropEventArgs.cs
- SHA256Managed.cs
- BufferedMessageWriter.cs
- StringAnimationBase.cs
- HiddenField.cs
- FormViewAutoFormat.cs
- X509CertificateCollection.cs
- KeyPressEvent.cs
- AssociationTypeEmitter.cs
- NetworkCredential.cs
- AlignmentYValidation.cs
- DoubleAnimationClockResource.cs
- CustomAttribute.cs
- LineSegment.cs
- TextProviderWrapper.cs
- MetabaseReader.cs
- ZoneLinkButton.cs
- GACMembershipCondition.cs
- AsyncStreamReader.cs
- _ListenerResponseStream.cs
- ButtonDesigner.cs
- BackgroundFormatInfo.cs
- DynamicMetaObjectBinder.cs
- SmiMetaDataProperty.cs
- DomainConstraint.cs
- smtppermission.cs
- Solver.cs
- FormsAuthenticationUserCollection.cs
- ComplusEndpointConfigContainer.cs
- ApplicationSecurityManager.cs
- CheckoutException.cs
- Baml6Assembly.cs
- SqlServices.cs
- FontStyle.cs