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
- EmptyStringExpandableObjectConverter.cs
- ZoneLinkButton.cs
- Sentence.cs
- LinkedList.cs
- DrawingAttributeSerializer.cs
- DataServiceCollectionOfT.cs
- WebServiceClientProxyGenerator.cs
- NativeMethods.cs
- EllipseGeometry.cs
- BindingList.cs
- Deflater.cs
- DescendantOverDescendantQuery.cs
- CompareInfo.cs
- DocumentManager.cs
- Panel.cs
- ListDictionary.cs
- XMLSyntaxException.cs
- StatusBar.cs
- SmiEventSink_Default.cs
- FontCacheUtil.cs
- GlyphCache.cs
- DataGridParentRows.cs
- Metafile.cs
- ParentUndoUnit.cs
- DependencyPropertyChangedEventArgs.cs
- XmlObjectSerializerContext.cs
- ConstraintStruct.cs
- TemplateLookupAction.cs
- SingleResultAttribute.cs
- InvalidStoreProtectionKeyException.cs
- Italic.cs
- JavaScriptSerializer.cs
- CanonicalFontFamilyReference.cs
- DesignerActionItemCollection.cs
- AdornerLayer.cs
- SqlMethodAttribute.cs
- BindingMAnagerBase.cs
- CodeObject.cs
- InternalRelationshipCollection.cs
- Repeater.cs
- KnownBoxes.cs
- DropShadowEffect.cs
- ListViewGroupConverter.cs
- EnumValAlphaComparer.cs
- AnimationTimeline.cs
- BooleanFacetDescriptionElement.cs
- TableLayoutRowStyleCollection.cs
- RelationshipEndCollection.cs
- HttpAsyncResult.cs
- BuildResultCache.cs
- FocusManager.cs
- SqlUdtInfo.cs
- GridViewUpdatedEventArgs.cs
- SecurityException.cs
- StyleCollection.cs
- PropertyItemInternal.cs
- StringDictionaryCodeDomSerializer.cs
- TextEffectCollection.cs
- QueryParameter.cs
- ClientSettingsStore.cs
- Clipboard.cs
- InternalDispatchObject.cs
- StylusPointPropertyUnit.cs
- FontStyles.cs
- DBConnectionString.cs
- GridViewPageEventArgs.cs
- Axis.cs
- AuthenticationException.cs
- ToolStripTextBox.cs
- SelectiveScrollingGrid.cs
- EntityContainer.cs
- BuildManagerHost.cs
- ClientOptions.cs
- ContainerAction.cs
- Msec.cs
- ControlBuilder.cs
- NativeMethods.cs
- ListItemConverter.cs
- CallSiteBinder.cs
- WindowsRegion.cs
- WebPartPersonalization.cs
- IndentedWriter.cs
- BinaryParser.cs
- GlobalProxySelection.cs
- safemediahandle.cs
- TransformValueSerializer.cs
- DataGridCell.cs
- DataGridViewDataConnection.cs
- ComboBoxAutomationPeer.cs
- SoapIncludeAttribute.cs
- RtfNavigator.cs
- RedistVersionInfo.cs
- XPathDocument.cs
- SimpleFileLog.cs
- GridViewCellAutomationPeer.cs
- MenuEventArgs.cs
- DataGridSortingEventArgs.cs
- CodeDomSerializerBase.cs
- TimeoutStream.cs
- HttpDateParse.cs