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
- AppDomain.cs
- SqlDataSourceConfigureSortForm.cs
- HostProtectionPermission.cs
- PageCanvasSize.cs
- ColorAnimationBase.cs
- RequestCachingSection.cs
- Matrix.cs
- BamlLocalizableResource.cs
- ConditionalDesigner.cs
- Touch.cs
- CustomCategoryAttribute.cs
- BounceEase.cs
- OrderByBuilder.cs
- FamilyMap.cs
- DataPagerFieldCommandEventArgs.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- EnumerableCollectionView.cs
- SoapUnknownHeader.cs
- RandomNumberGenerator.cs
- ReliableMessagingVersionConverter.cs
- ComponentResourceKey.cs
- ObjectDataSourceEventArgs.cs
- DataGridViewAutoSizeModeEventArgs.cs
- PropertyFilterAttribute.cs
- KeyToListMap.cs
- HostExecutionContextManager.cs
- CacheVirtualItemsEvent.cs
- XPathBinder.cs
- DataBindingExpressionBuilder.cs
- Annotation.cs
- httpserverutility.cs
- UInt16Converter.cs
- HtmlGenericControl.cs
- WebPartConnectionsCancelEventArgs.cs
- TableLayoutPanelCellPosition.cs
- DesignTimeParseData.cs
- DateTime.cs
- WebPartConnectionCollection.cs
- ISCIIEncoding.cs
- MediaContext.cs
- RegisterInfo.cs
- InputScope.cs
- Version.cs
- HttpProfileGroupBase.cs
- ChangeInterceptorAttribute.cs
- WebCategoryAttribute.cs
- WebPartZone.cs
- FaultException.cs
- InstanceKey.cs
- SafeArrayTypeMismatchException.cs
- DelegatedStream.cs
- XmlSchemaImport.cs
- PKCS1MaskGenerationMethod.cs
- DiscoveryClientProtocol.cs
- VectorAnimation.cs
- ActivityDesigner.cs
- BrushValueSerializer.cs
- WebErrorHandler.cs
- PartialCachingAttribute.cs
- EncodingStreamWrapper.cs
- DispatcherExceptionEventArgs.cs
- wgx_render.cs
- FieldAccessException.cs
- XamlTreeBuilderBamlRecordWriter.cs
- ZipIOLocalFileDataDescriptor.cs
- DbModificationClause.cs
- SelectedDatesCollection.cs
- MarginsConverter.cs
- QuaternionAnimation.cs
- UnsafePeerToPeerMethods.cs
- FunctionNode.cs
- NativeMethods.cs
- XmlSchemaElement.cs
- NetTcpSectionData.cs
- Button.cs
- Operand.cs
- shaper.cs
- SoapMessage.cs
- TextDocumentView.cs
- EventHandlingScope.cs
- MultiTrigger.cs
- Switch.cs
- VolatileEnlistmentState.cs
- WindowsSysHeader.cs
- TypeDescriptionProviderAttribute.cs
- OperationInvokerBehavior.cs
- SqlRetyper.cs
- InteropDesigner.xaml.cs
- CodeDirectionExpression.cs
- ILGen.cs
- DateTimeFormat.cs
- SecurityContext.cs
- InfocardExtendedInformationEntry.cs
- TextCompositionManager.cs
- ReachUIElementCollectionSerializer.cs
- LocalizabilityAttribute.cs
- NodeLabelEditEvent.cs
- SafeFileMappingHandle.cs
- ZipIOExtraFieldZip64Element.cs
- TextElementEditingBehaviorAttribute.cs