Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Security / Tokens / DerivedKeySecurityTokenStub.cs / 1 / DerivedKeySecurityTokenStub.cs
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------
namespace System.ServiceModel.Security.Tokens
{
using System.Collections.ObjectModel;
using System.ServiceModel;
using System.IdentityModel.Claims;
using System.IdentityModel.Policy;
using System.IdentityModel.Tokens;
sealed class DerivedKeySecurityTokenStub : SecurityToken
{
string id;
string derivationAlgorithm;
string label;
int length;
byte[] nonce;
int offset;
int generation;
SecurityKeyIdentifierClause tokenToDeriveIdentifier;
public DerivedKeySecurityTokenStub(int generation, int offset, int length,
string label, byte[] nonce,
SecurityKeyIdentifierClause tokenToDeriveIdentifier, string derivationAlgorithm, string id)
{
this.id = id;
this.generation = generation;
this.offset = offset;
this.length = length;
this.label = label;
this.nonce = nonce;
this.tokenToDeriveIdentifier = tokenToDeriveIdentifier;
this.derivationAlgorithm = derivationAlgorithm;
}
public override string Id
{
get { return this.id; }
}
public override DateTime ValidFrom
{
#pragma warning suppress 56503 // Property does not make sense for Derived Key tokens.
get { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotImplementedException()); }
}
public override DateTime ValidTo
{
#pragma warning suppress 56503 // Property does not make sense for Derived Key tokens.
get { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new NotImplementedException()); }
}
public override ReadOnlyCollection SecurityKeys
{
get { return null; }
}
public SecurityKeyIdentifierClause TokenToDeriveIdentifier
{
get { return this.tokenToDeriveIdentifier; }
}
public DerivedKeySecurityToken CreateToken(SecurityToken tokenToDerive, int maxKeyLength)
{
DerivedKeySecurityToken result = new DerivedKeySecurityToken(this.generation, this.offset, this.length,
this.label, this.nonce, tokenToDerive, this.tokenToDeriveIdentifier, this.derivationAlgorithm, this.Id);
result.InitializeDerivedKey(maxKeyLength);
return result;
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DragStartedEventArgs.cs
- HostedElements.cs
- ModelUtilities.cs
- GuidTagList.cs
- Transform.cs
- CodeAccessSecurityEngine.cs
- LocalizableAttribute.cs
- GPRECT.cs
- SqlXmlStorage.cs
- SimpleNameService.cs
- SetUserPreferenceRequest.cs
- PatternMatcher.cs
- VerbConverter.cs
- ItemCheckedEvent.cs
- IssuedSecurityTokenProvider.cs
- SchemaElementDecl.cs
- DeclaredTypeValidatorAttribute.cs
- ConfigXmlComment.cs
- ElementMarkupObject.cs
- HierarchicalDataSourceControl.cs
- Popup.cs
- ChannelManagerService.cs
- HealthMonitoringSectionHelper.cs
- DescriptionAttribute.cs
- Action.cs
- CryptoConfig.cs
- ServiceObjectContainer.cs
- DomainConstraint.cs
- SapiInterop.cs
- DetailsViewRow.cs
- RevocationPoint.cs
- ProcessManager.cs
- EqualityArray.cs
- ListViewHitTestInfo.cs
- CatalogPartChrome.cs
- RbTree.cs
- OleAutBinder.cs
- AnnouncementService.cs
- TitleStyle.cs
- Types.cs
- XmlDataSource.cs
- PagesSection.cs
- PersonalizablePropertyEntry.cs
- ListControl.cs
- CompleteWizardStep.cs
- SqlDataReaderSmi.cs
- FileDialog.cs
- InstanceDescriptor.cs
- FixedLineResult.cs
- Drawing.cs
- DBCommandBuilder.cs
- ObjectConverter.cs
- RightsManagementInformation.cs
- TagMapInfo.cs
- SelectedGridItemChangedEvent.cs
- DnsPermission.cs
- XpsFixedDocumentReaderWriter.cs
- SqlBinder.cs
- DesignerCalendarAdapter.cs
- ELinqQueryState.cs
- CookieParameter.cs
- DataGridViewTopLeftHeaderCell.cs
- AllMembershipCondition.cs
- CodeDelegateInvokeExpression.cs
- Font.cs
- DataContractJsonSerializerOperationBehavior.cs
- ElementNotEnabledException.cs
- DataControlField.cs
- ToolStripComboBox.cs
- HandleRef.cs
- ClientEventManager.cs
- SettingsPropertyIsReadOnlyException.cs
- NullableLongAverageAggregationOperator.cs
- SafeEventLogReadHandle.cs
- DataListItemCollection.cs
- Nullable.cs
- AutomationPropertyInfo.cs
- peernodeimplementation.cs
- DataRelation.cs
- QuerySetOp.cs
- LinqDataSourceSelectEventArgs.cs
- LocatorGroup.cs
- CanExecuteRoutedEventArgs.cs
- CheckBoxStandardAdapter.cs
- SystemWebExtensionsSectionGroup.cs
- TreeViewHitTestInfo.cs
- RenderCapability.cs
- _ListenerResponseStream.cs
- CapabilitiesPattern.cs
- TypeGeneratedEventArgs.cs
- LicenseException.cs
- HiddenFieldDesigner.cs
- TextStore.cs
- FontStyle.cs
- TextModifier.cs
- RemotingAttributes.cs
- SafeEventLogWriteHandle.cs
- ImageFormatConverter.cs
- DebugManager.cs
- TraceContext.cs