Code:
/ 4.0 / 4.0 / 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. //------------------------------------------------------------ // 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
- DocumentPageView.cs
- ImageKeyConverter.cs
- DataContractSerializerOperationGenerator.cs
- RegexCompilationInfo.cs
- ICspAsymmetricAlgorithm.cs
- ServiceModelEnhancedConfigurationElementCollection.cs
- Module.cs
- DefinitionBase.cs
- infer.cs
- KeyEventArgs.cs
- TableRowGroup.cs
- AssemblyResolver.cs
- TransactionChannelFaultConverter.cs
- HostProtectionException.cs
- XmlCollation.cs
- DbConnectionPoolCounters.cs
- DeferredReference.cs
- storepermission.cs
- NativeMethods.cs
- LocatorBase.cs
- ResourcesBuildProvider.cs
- ForwardPositionQuery.cs
- XmlSerializerFactory.cs
- FormCollection.cs
- UseLicense.cs
- NamespaceMapping.cs
- MimeObjectFactory.cs
- WebPartConnectionCollection.cs
- RemotingConfigParser.cs
- BitmapEffectDrawingContextState.cs
- DropShadowBitmapEffect.cs
- MemberDomainMap.cs
- OleDbParameter.cs
- ThreadStaticAttribute.cs
- odbcmetadatacolumnnames.cs
- Viewport3DVisual.cs
- HttpFileCollectionBase.cs
- DataGridBoundColumn.cs
- HGlobalSafeHandle.cs
- ConfigurationLocation.cs
- SQLInt32Storage.cs
- ScrollProviderWrapper.cs
- RuleDefinitions.cs
- SqlDataSourceParameterParser.cs
- HyperLinkStyle.cs
- RouteItem.cs
- TreeView.cs
- PackageStore.cs
- Int32Converter.cs
- BamlLocalizableResourceKey.cs
- ReaderOutput.cs
- SortExpressionBuilder.cs
- RemotingAttributes.cs
- RotateTransform3D.cs
- ListDictionary.cs
- FacetChecker.cs
- login.cs
- DictionaryManager.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- PropertyTabChangedEvent.cs
- GeneralTransform3DGroup.cs
- ToolStripComboBox.cs
- XmlSignificantWhitespace.cs
- XamlReaderConstants.cs
- WizardStepBase.cs
- ProfilePropertySettings.cs
- TraceLog.cs
- CompModSwitches.cs
- ImageAutomationPeer.cs
- NavigationWindow.cs
- WebControlsSection.cs
- ObjectAssociationEndMapping.cs
- ClassValidator.cs
- NavigateEvent.cs
- VarRefManager.cs
- FormsAuthenticationUserCollection.cs
- SqlNotificationRequest.cs
- _NTAuthentication.cs
- SerializationHelper.cs
- IndicShape.cs
- OracleColumn.cs
- DbConnectionStringBuilder.cs
- FlowSwitch.cs
- EntityTemplateUserControl.cs
- AdornerDecorator.cs
- AsymmetricAlgorithm.cs
- PageTheme.cs
- WorkflowMessageEventHandler.cs
- Color.cs
- SingleAnimationBase.cs
- SafeRightsManagementPubHandle.cs
- MoveSizeWinEventHandler.cs
- COM2PropertyDescriptor.cs
- DbConnectionStringBuilder.cs
- Substitution.cs
- DocumentXmlWriter.cs
- BuildProviderAppliesToAttribute.cs
- SecurityRuntime.cs
- _ShellExpression.cs
- WebPartActionVerb.cs