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
- WebBrowserEvent.cs
- DetailsViewPagerRow.cs
- EnumConverter.cs
- RuleInfoComparer.cs
- x509store.cs
- formatter.cs
- COM2PropertyBuilderUITypeEditor.cs
- InteropBitmapSource.cs
- DataColumn.cs
- WindowsTooltip.cs
- DrawingServices.cs
- WebPartConnectVerb.cs
- DateTimeSerializationSection.cs
- XMLSchema.cs
- XmlSchemaValidator.cs
- MultipartIdentifier.cs
- X509RawDataKeyIdentifierClause.cs
- compensatingcollection.cs
- ObjectHandle.cs
- CrossContextChannel.cs
- PropertyInfoSet.cs
- Axis.cs
- ImpersonationContext.cs
- SmiContext.cs
- FormsAuthenticationTicket.cs
- BlurBitmapEffect.cs
- ToolStripDropDownItem.cs
- PerspectiveCamera.cs
- RelativeSource.cs
- HttpFileCollection.cs
- latinshape.cs
- PropertyGroupDescription.cs
- CompiledRegexRunner.cs
- CalendarDateChangedEventArgs.cs
- DatagramAdapter.cs
- XPathBinder.cs
- Panel.cs
- ProgramPublisher.cs
- BooleanExpr.cs
- IdentityHolder.cs
- ContentDisposition.cs
- XslAst.cs
- MultiAsyncResult.cs
- TabPageDesigner.cs
- TileBrush.cs
- IsolatedStorage.cs
- BitmapEffectInputData.cs
- CodeObjectCreateExpression.cs
- URLAttribute.cs
- DropShadowEffect.cs
- HasCopySemanticsAttribute.cs
- ImpersonateTokenRef.cs
- SequentialOutput.cs
- Int16KeyFrameCollection.cs
- TraceInternal.cs
- SerializationInfo.cs
- NotifyIcon.cs
- ReadOnlyDataSourceView.cs
- ClientSideQueueItem.cs
- TextContainer.cs
- BamlTreeUpdater.cs
- PropertyEmitter.cs
- DeviceSpecificDesigner.cs
- OracleBoolean.cs
- Security.cs
- UrlPath.cs
- TextFindEngine.cs
- XmlSchemaException.cs
- IgnoreSection.cs
- XmlIncludeAttribute.cs
- RTTypeWrapper.cs
- StylusSystemGestureEventArgs.cs
- SQLStringStorage.cs
- TabItemAutomationPeer.cs
- DbException.cs
- SerializationEventsCache.cs
- ThicknessAnimation.cs
- ToolboxItemFilterAttribute.cs
- ConstrainedGroup.cs
- XXXInfos.cs
- SoapRpcMethodAttribute.cs
- FlowDocumentView.cs
- ContentDisposition.cs
- PartialArray.cs
- Empty.cs
- SqlFormatter.cs
- WizardStepBase.cs
- PropertyTabChangedEvent.cs
- _CookieModule.cs
- AspNetHostingPermission.cs
- BasicSecurityProfileVersion.cs
- XmlChildEnumerator.cs
- LocatorPart.cs
- ScriptingSectionGroup.cs
- SecurityTokenSpecification.cs
- SqlDataSourceCache.cs
- httpapplicationstate.cs
- HtmlButton.cs
- List.cs
- ActionFrame.cs