Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Security / SignatureConfirmations.cs / 1 / SignatureConfirmations.cs
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------
namespace System.ServiceModel.Security
{
using System;
class SignatureConfirmations
{
SignatureConfirmation[] confirmations;
int length;
bool encrypted;
struct SignatureConfirmation
{
public byte[] value;
public SignatureConfirmation(byte[] value)
{
this.value = value;
}
}
public SignatureConfirmations()
{
confirmations = new SignatureConfirmation[1];
length = 0;
}
public int Count
{
get { return length; }
}
public void AddConfirmation(byte[] value, bool encrypted)
{
if (confirmations.Length == length)
{
SignatureConfirmation[] newConfirmations = new SignatureConfirmation[length*2];
Array.Copy(confirmations, 0, newConfirmations, 0, length);
confirmations = newConfirmations;
}
confirmations[length] = new SignatureConfirmation(value);
++length;
this.encrypted |= encrypted;
}
public void GetConfirmation(int index, out byte[] value, out bool encrypted)
{
if (index < 0 || index >= length)
{
throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentOutOfRangeException("index", SR.GetString(SR.ValueMustBeInRange, 0, length)));
}
value = confirmations[index].value;
encrypted = this.encrypted;
}
public bool IsMarkedForEncryption
{
get { return this.encrypted; }
}
}
}
// 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
- PocoEntityKeyStrategy.cs
- RequestQueue.cs
- MessageSmuggler.cs
- StreamGeometry.cs
- ReadWriteSpinLock.cs
- ElementHostAutomationPeer.cs
- BitmapEffectDrawingContextWalker.cs
- Viewport3DAutomationPeer.cs
- NoPersistHandle.cs
- HttpAsyncResult.cs
- RbTree.cs
- StringToken.cs
- SqlNode.cs
- ProjectionCamera.cs
- Rule.cs
- StaticExtension.cs
- ApplicationBuildProvider.cs
- ButtonField.cs
- Range.cs
- HierarchicalDataBoundControlAdapter.cs
- SqlRowUpdatingEvent.cs
- WmlValidatorAdapter.cs
- XmlNamespaceMapping.cs
- DependencyPropertyChangedEventArgs.cs
- UserCancellationException.cs
- SslStreamSecurityBindingElement.cs
- InternalPermissions.cs
- XmlStreamStore.cs
- TypeToArgumentTypeConverter.cs
- embossbitmapeffect.cs
- DataObject.cs
- HostExecutionContextManager.cs
- PriorityBinding.cs
- RtType.cs
- ZoomPercentageConverter.cs
- ExceptionValidationRule.cs
- WebPartDisplayModeEventArgs.cs
- MetadataPropertyAttribute.cs
- ProfileGroupSettings.cs
- ThousandthOfEmRealPoints.cs
- WorkflowQueuingService.cs
- MissingManifestResourceException.cs
- RoleServiceManager.cs
- ToolBarButtonClickEvent.cs
- Native.cs
- CharEntityEncoderFallback.cs
- Win32Native.cs
- SQLStringStorage.cs
- InvokePattern.cs
- MatcherBuilder.cs
- OdbcParameterCollection.cs
- DecimalAnimationBase.cs
- FormatVersion.cs
- KnownBoxes.cs
- ExpressionEditorAttribute.cs
- SiteMapNodeCollection.cs
- KnownColorTable.cs
- ValueHandle.cs
- DocumentXPathNavigator.cs
- WebAdminConfigurationHelper.cs
- PaperSize.cs
- TextBoxRenderer.cs
- ISessionStateStore.cs
- XPathSelfQuery.cs
- LocalizabilityAttribute.cs
- WebMessageFormatHelper.cs
- PageTheme.cs
- FrameDimension.cs
- EventArgs.cs
- TreeNode.cs
- MethodCallTranslator.cs
- MimeTypeAttribute.cs
- WebPartMinimizeVerb.cs
- RelationshipWrapper.cs
- DataServiceRequest.cs
- CommandManager.cs
- CodeTypeMember.cs
- CodeMemberEvent.cs
- ProcessStartInfo.cs
- DataGridColumn.cs
- VirtualPathProvider.cs
- GridViewActionList.cs
- WebConfigurationManager.cs
- PackWebRequestFactory.cs
- METAHEADER.cs
- ProtocolsConfigurationEntry.cs
- TextCompositionManager.cs
- ReadOnlyPropertyMetadata.cs
- UndoEngine.cs
- DigitalSignature.cs
- StatusBarAutomationPeer.cs
- DataDesignUtil.cs
- CodeMemberField.cs
- DBCommand.cs
- MetadataPropertyAttribute.cs
- Font.cs
- HostVisual.cs
- SiteMapDesignerDataSourceView.cs
- HandlerWithFactory.cs
- MonthCalendar.cs