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
- ValidationRule.cs
- GeometryDrawing.cs
- InvalidateEvent.cs
- SynchronizationHandlesCodeDomSerializer.cs
- UnsafeNativeMethods.cs
- Html32TextWriter.cs
- SqlCommandSet.cs
- ColumnPropertiesGroup.cs
- BoolExpression.cs
- MarkedHighlightComponent.cs
- ScaleTransform3D.cs
- AdvancedBindingPropertyDescriptor.cs
- NullableDecimalAverageAggregationOperator.cs
- _SslSessionsCache.cs
- VariableReference.cs
- FixedSOMLineCollection.cs
- WmlImageAdapter.cs
- WorkflowOperationInvoker.cs
- DomainConstraint.cs
- FileStream.cs
- DataGridItemEventArgs.cs
- LabelAutomationPeer.cs
- DataPagerFieldCollection.cs
- IdentityVerifier.cs
- Baml2006ReaderFrame.cs
- ScrollChrome.cs
- MutableAssemblyCacheEntry.cs
- ItemsPanelTemplate.cs
- ToggleButton.cs
- TimeoutException.cs
- RelationshipConstraintValidator.cs
- RelationshipEnd.cs
- EventMappingSettings.cs
- FaultHandlingFilter.cs
- StylesEditorDialog.cs
- StructuralObject.cs
- MembershipSection.cs
- OdbcException.cs
- DrawListViewColumnHeaderEventArgs.cs
- FieldNameLookup.cs
- IndexerNameAttribute.cs
- GenericAuthenticationEventArgs.cs
- NamespaceDisplay.xaml.cs
- ServiceErrorHandler.cs
- SplitterEvent.cs
- SamlAssertionKeyIdentifierClause.cs
- MouseGesture.cs
- DocumentSchemaValidator.cs
- WebControlAdapter.cs
- QilCloneVisitor.cs
- HttpDigestClientCredential.cs
- UndoEngine.cs
- SimpleMailWebEventProvider.cs
- TextViewSelectionProcessor.cs
- Logging.cs
- RowSpanVector.cs
- ExtensionFile.cs
- EncryptedReference.cs
- Block.cs
- TransactionContext.cs
- CurrentChangedEventManager.cs
- IIS7UserPrincipal.cs
- SiteMapNodeItemEventArgs.cs
- NativeWindow.cs
- Descriptor.cs
- BaseAppDomainProtocolHandler.cs
- SqlCachedBuffer.cs
- WSFederationHttpSecurityMode.cs
- FixedHighlight.cs
- HttpListenerRequest.cs
- basemetadatamappingvisitor.cs
- LayoutEditorPart.cs
- UIElement3D.cs
- Opcode.cs
- ContainerUIElement3D.cs
- CodeTypeParameter.cs
- COM2TypeInfoProcessor.cs
- XmlTextAttribute.cs
- FormatSettings.cs
- FontNamesConverter.cs
- DelegateArgumentValue.cs
- ServerIdentity.cs
- TriggerAction.cs
- XmlChildNodes.cs
- PtsPage.cs
- AsyncResult.cs
- GeneralTransformGroup.cs
- Helper.cs
- SystemIcmpV6Statistics.cs
- SqlNodeAnnotations.cs
- LessThanOrEqual.cs
- FactoryId.cs
- BigInt.cs
- Assembly.cs
- HierarchicalDataSourceControl.cs
- StyleXamlParser.cs
- TagPrefixAttribute.cs
- UnsafeNativeMethodsMilCoreApi.cs
- FixedPage.cs
- ForeignConstraint.cs