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
- ServiceReference.cs
- MenuItemBinding.cs
- ReadOnlyCollectionBase.cs
- BitmapCache.cs
- FeatureManager.cs
- ChannelBase.cs
- XpsLiterals.cs
- GlobalProxySelection.cs
- NextPreviousPagerField.cs
- ReadOnlyTernaryTree.cs
- DBNull.cs
- AppModelKnownContentFactory.cs
- ISAPIRuntime.cs
- Stylus.cs
- ResourceSetExpression.cs
- ObjectDataSourceSelectingEventArgs.cs
- ListViewItemEventArgs.cs
- LocalizeDesigner.cs
- MetafileHeaderEmf.cs
- CapacityStreamGeometryContext.cs
- TypeUnloadedException.cs
- serverconfig.cs
- UIAgentAsyncBeginRequest.cs
- XmlEntityReference.cs
- PassportPrincipal.cs
- PersonalizationDictionary.cs
- SecurityRuntime.cs
- InstanceDataCollectionCollection.cs
- Expression.cs
- FloatMinMaxAggregationOperator.cs
- ServiceNotStartedException.cs
- EditableRegion.cs
- MouseWheelEventArgs.cs
- FieldDescriptor.cs
- Mutex.cs
- DiscoveryServiceExtension.cs
- ContentDefinition.cs
- PartitionedStream.cs
- PinnedBufferMemoryStream.cs
- AnnouncementEventArgs.cs
- ToolStripOverflowButton.cs
- ExtentKey.cs
- RegexMatchCollection.cs
- Matrix.cs
- Underline.cs
- CodeNamespaceImport.cs
- ETagAttribute.cs
- SynchronizedCollection.cs
- WorkflowInspectionServices.cs
- CompiledIdentityConstraint.cs
- PackagingUtilities.cs
- XmlException.cs
- DataGridViewColumnDesigner.cs
- SupportingTokenSpecification.cs
- TableHeaderCell.cs
- ObjectContext.cs
- WebContext.cs
- SystemDropShadowChrome.cs
- EnvelopeVersion.cs
- ContentAlignmentEditor.cs
- AnonymousIdentificationModule.cs
- DataSetMappper.cs
- WsdlParser.cs
- WindowsSpinner.cs
- DataRowChangeEvent.cs
- BinaryUtilClasses.cs
- TableRowCollection.cs
- DataGridViewColumnEventArgs.cs
- SourceSwitch.cs
- UDPClient.cs
- TextEditorParagraphs.cs
- DataGridViewUtilities.cs
- SecurityResources.cs
- XmlSchemaValidator.cs
- Substitution.cs
- SocketElement.cs
- ServerIdentity.cs
- ToolStripDropDownClosedEventArgs.cs
- UnsafeNativeMethods.cs
- PseudoWebRequest.cs
- HttpListenerElement.cs
- SubpageParaClient.cs
- TypeSemantics.cs
- UrlPath.cs
- IApplicationTrustManager.cs
- ManagedIStream.cs
- HyperLink.cs
- AssemblyCache.cs
- CharAnimationUsingKeyFrames.cs
- SortableBindingList.cs
- SlipBehavior.cs
- InstallHelper.cs
- Guid.cs
- ListViewItem.cs
- DrawListViewColumnHeaderEventArgs.cs
- ObjectAnimationUsingKeyFrames.cs
- Assign.cs
- SQLInt16Storage.cs
- QueuePathDialog.cs
- PerfCounters.cs