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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- MDIWindowDialog.cs
- SerializationSectionGroup.cs
- XmlQueryOutput.cs
- BamlResourceSerializer.cs
- XmlReader.cs
- WebPageTraceListener.cs
- StandardCommandToolStripMenuItem.cs
- TypeBuilder.cs
- SQLMembershipProvider.cs
- XmlDocument.cs
- Directory.cs
- EventEntry.cs
- WorkflowServiceHostFactory.cs
- CookieParameter.cs
- TimelineCollection.cs
- ValidationService.cs
- MemberRelationshipService.cs
- CategoryGridEntry.cs
- SqlDependencyListener.cs
- MetadataFile.cs
- WSFederationHttpBindingCollectionElement.cs
- PerspectiveCamera.cs
- PeerCredential.cs
- HtmlInputCheckBox.cs
- SignatureResourceHelper.cs
- CleanUpVirtualizedItemEventArgs.cs
- validation.cs
- VScrollProperties.cs
- StylusShape.cs
- RuntimeHandles.cs
- SettingsBase.cs
- MailWebEventProvider.cs
- AssemblyResourceLoader.cs
- WebPartTransformer.cs
- SourceCollection.cs
- RoleBoolean.cs
- SpeechRecognizer.cs
- DataGridViewTextBoxColumn.cs
- ClientConvert.cs
- StatusBarAutomationPeer.cs
- TextRangeEdit.cs
- DataGridToolTip.cs
- JulianCalendar.cs
- OdbcConnection.cs
- DbDataAdapter.cs
- NativeActivityAbortContext.cs
- TraceInternal.cs
- ListViewItem.cs
- Label.cs
- ConnectionPoint.cs
- TextTreeUndoUnit.cs
- NavigationPropertyEmitter.cs
- contentDescriptor.cs
- ListItemCollection.cs
- RequestCacheValidator.cs
- ProviderSettings.cs
- UInt64Converter.cs
- DataSourceHelper.cs
- WindowCollection.cs
- EntityDataSourceDesigner.cs
- AutomationEventArgs.cs
- RequestCacheValidator.cs
- PropertyMetadata.cs
- DateTimeFormatInfoScanner.cs
- BooleanExpr.cs
- PolyLineSegmentFigureLogic.cs
- DataRelationPropertyDescriptor.cs
- ResponseBodyWriter.cs
- SimpleLine.cs
- NativeWrapper.cs
- _AcceptOverlappedAsyncResult.cs
- CroppedBitmap.cs
- SqlDataAdapter.cs
- _FixedSizeReader.cs
- ScriptResourceDefinition.cs
- GlyphElement.cs
- HMACSHA256.cs
- Compiler.cs
- TdsParserSessionPool.cs
- _OSSOCK.cs
- Validator.cs
- Int32Converter.cs
- CacheRequest.cs
- unsafeIndexingFilterStream.cs
- System.Data_BID.cs
- WebBrowserEvent.cs
- DesignBindingConverter.cs
- EmptyTextWriter.cs
- VisualState.cs
- HealthMonitoringSectionHelper.cs
- TimeZone.cs
- IsolatedStorage.cs
- UserInitiatedNavigationPermission.cs
- PersonalizationEntry.cs
- WindowsRichEditRange.cs
- DoubleAnimationUsingPath.cs
- RadioButton.cs
- BinaryCommonClasses.cs
- MergePropertyDescriptor.cs
- TextDecorationLocationValidation.cs