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
- ServiceCredentialsSecurityTokenManager.cs
- PropertyManager.cs
- DbDeleteCommandTree.cs
- MouseGestureConverter.cs
- InfoCardProofToken.cs
- Variable.cs
- SqlSupersetValidator.cs
- BaseCollection.cs
- GridItem.cs
- TriggerBase.cs
- Encoder.cs
- AppDomainAttributes.cs
- ButtonAutomationPeer.cs
- TextRange.cs
- PreviewKeyDownEventArgs.cs
- Logging.cs
- SafeCryptoHandles.cs
- KeyEventArgs.cs
- WmlLiteralTextAdapter.cs
- MouseEvent.cs
- control.ime.cs
- WSSecurityTokenSerializer.cs
- DelegatingStream.cs
- DirectoryNotFoundException.cs
- DataAdapter.cs
- StatusBarDrawItemEvent.cs
- SqlCharStream.cs
- RegexStringValidatorAttribute.cs
- EnumerableRowCollectionExtensions.cs
- TargetParameterCountException.cs
- UserPreferenceChangedEventArgs.cs
- InputBindingCollection.cs
- FlowLayoutSettings.cs
- SqlDataSourceCache.cs
- Transform.cs
- IIS7UserPrincipal.cs
- PartitionerQueryOperator.cs
- AssertUtility.cs
- CompilationRelaxations.cs
- mactripleDES.cs
- ProvidePropertyAttribute.cs
- WSFederationHttpBinding.cs
- PeerObject.cs
- TableSectionStyle.cs
- DispatchChannelSink.cs
- DataKeyCollection.cs
- Typography.cs
- PerfCounterSection.cs
- NestedContainer.cs
- RadioButtonBaseAdapter.cs
- SrgsGrammarCompiler.cs
- ColumnPropertiesGroup.cs
- Enum.cs
- XmlAttributeOverrides.cs
- RewritingValidator.cs
- WebPartExportVerb.cs
- HandleCollector.cs
- FullTextState.cs
- MergeFailedEvent.cs
- EnumType.cs
- DataGridTable.cs
- SuppressMergeCheckAttribute.cs
- NamespaceDecl.cs
- X509UI.cs
- documentsequencetextcontainer.cs
- DiagnosticsConfigurationHandler.cs
- ExceptQueryOperator.cs
- ChildrenQuery.cs
- CodeValidator.cs
- ClientBuildManager.cs
- AlphabetConverter.cs
- securitycriticaldataformultiplegetandset.cs
- ObjectResult.cs
- XmlWhitespace.cs
- BmpBitmapEncoder.cs
- FunctionUpdateCommand.cs
- mediaeventargs.cs
- DataGridColumnHeader.cs
- TableRow.cs
- TraceProvider.cs
- DesignerOptionService.cs
- XmlQueryStaticData.cs
- MonthCalendar.cs
- ArgumentOutOfRangeException.cs
- DataGridCell.cs
- Crypto.cs
- XmlBoundElement.cs
- ClientRuntimeConfig.cs
- Positioning.cs
- WmpBitmapDecoder.cs
- XPathPatternBuilder.cs
- CopyNodeSetAction.cs
- TdsParserSafeHandles.cs
- QueuePropertyVariants.cs
- StatusBarPanel.cs
- HybridCollection.cs
- StateMachineWorkflowDesigner.cs
- Attribute.cs
- UpdateTranslator.cs
- Selection.cs