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
- WebPartConnectVerb.cs
- Odbc32.cs
- BitmapImage.cs
- CapabilitiesRule.cs
- PtsCache.cs
- TopClause.cs
- TextEffectResolver.cs
- SqlDelegatedTransaction.cs
- SparseMemoryStream.cs
- OleDbEnumerator.cs
- PartialToken.cs
- WindowsRichEdit.cs
- AutomationPeer.cs
- FormsIdentity.cs
- DataTableNewRowEvent.cs
- CaseInsensitiveHashCodeProvider.cs
- ConfigXmlAttribute.cs
- RoleManagerSection.cs
- MediaCommands.cs
- RectConverter.cs
- SecureStringHasher.cs
- RowToParametersTransformer.cs
- Cursors.cs
- FormsAuthenticationCredentials.cs
- MemoryStream.cs
- WorkflowRuntimeServiceElementCollection.cs
- InstanceDataCollection.cs
- SoapExtensionStream.cs
- XsltSettings.cs
- PageBuildProvider.cs
- SqlGenericUtil.cs
- CheckedPointers.cs
- SmtpException.cs
- ListViewItem.cs
- TypeDescriptionProvider.cs
- DataKey.cs
- StreamGeometry.cs
- ListViewSortEventArgs.cs
- ExpandedWrapper.cs
- AnchoredBlock.cs
- TextTreeRootTextBlock.cs
- MessageSecurityVersion.cs
- SiteMap.cs
- AudioSignalProblemOccurredEventArgs.cs
- SimpleHandlerBuildProvider.cs
- HttpCachePolicy.cs
- HtmlInputImage.cs
- ExtendedPropertyCollection.cs
- DataObjectSettingDataEventArgs.cs
- InstanceNotReadyException.cs
- SelectionEditor.cs
- SafeNativeMethods.cs
- FontClient.cs
- MimeFormReflector.cs
- XmlReaderSettings.cs
- SapiInterop.cs
- ArgumentOutOfRangeException.cs
- SerializerDescriptor.cs
- EntityCommandExecutionException.cs
- SessionStateItemCollection.cs
- Matrix.cs
- UnsafeNativeMethods.cs
- HitTestResult.cs
- CommandEventArgs.cs
- SrgsItemList.cs
- TouchDevice.cs
- DataGridViewColumnCollection.cs
- ActivityWithResult.cs
- HttpCacheParams.cs
- ThreadSafeList.cs
- GetPageCompletedEventArgs.cs
- ClientWindowsAuthenticationMembershipProvider.cs
- Bidi.cs
- HyperLinkStyle.cs
- ListViewGroupItemCollection.cs
- SwitchAttribute.cs
- SchemaImporterExtensionElementCollection.cs
- ButtonPopupAdapter.cs
- SqlDataSourceAdvancedOptionsForm.cs
- Enlistment.cs
- SecureStringHasher.cs
- Listbox.cs
- PriorityItem.cs
- ASCIIEncoding.cs
- UrlPath.cs
- RenamedEventArgs.cs
- DocumentPageView.cs
- ConstructorBuilder.cs
- KeyValueConfigurationCollection.cs
- TypeDescriptionProvider.cs
- Pointer.cs
- DataBindingExpressionBuilder.cs
- CodeEntryPointMethod.cs
- SQLConvert.cs
- ParallelForEach.cs
- ResizeGrip.cs
- CompositionAdorner.cs
- WSSecurityPolicy.cs
- CodeTypeMember.cs
- Int32KeyFrameCollection.cs