Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / infocard / Service / managed / Microsoft / InfoCards / SignHashRequest.cs / 1 / SignHashRequest.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace Microsoft.InfoCards { using System; using System.Collections; using System.Diagnostics; using System.Runtime.InteropServices; using System.Text; using System.IO; using System.Security.Principal; internal class SignHashRequest : ClientRequest { // // in // int m_sessionId; byte[ ] m_hash; string m_hashAlgOid; // // out // byte[ ] m_sig; // // Summary: // SignHashRequest CTOR // // Arguments: // callingProcess - The process in which the caller originated. // callingIdentity - The WindowsIdentity of the caller // rpcHandle - The handle of the native RPC request // inArgs - The stream to read input data from // outArgs - The stream to write output data to // public SignHashRequest( Process callingProcess, WindowsIdentity callingIdentity, IntPtr rpcHandle, Stream inArgs, Stream outArgs ) : base( callingProcess, callingIdentity, rpcHandle, inArgs, outArgs ) { m_sig = null; } protected override void OnMarshalInArgs() { BinaryReader breader = new InfoCardBinaryReader( InArgs, Encoding.Unicode ); m_sessionId = breader.ReadInt32(); int hashLength = breader.ReadInt32(); m_hash = breader.ReadBytes( hashLength ); m_hashAlgOid = Utility.DeserializeString( breader ); } protected override void OnProcess() { AsymmetricCryptoSession session = ( AsymmetricCryptoSession )CryptoSession.Find( m_sessionId, ( uint ) CallerPid, RequestorIdentity.User ); m_sig = session.SignHash( m_hash, m_hashAlgOid ); } protected override void OnMarshalOutArgs() { BinaryWriter bwriter = new BinaryWriter( OutArgs, Encoding.Unicode ); bwriter.Write( m_sig.Length ); bwriter.Write( m_sig ); } } } // 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
- ColorPalette.cs
- JavaScriptObjectDeserializer.cs
- SimpleModelProvider.cs
- AdvancedBindingEditor.cs
- PropertyBuilder.cs
- MethodExecutor.cs
- CompilerResults.cs
- EdmScalarPropertyAttribute.cs
- PageAsyncTaskManager.cs
- ToolStripSeparator.cs
- EncryptedKey.cs
- MultipartContentParser.cs
- Utils.cs
- FormatterServices.cs
- ServiceHttpHandlerFactory.cs
- ScriptManager.cs
- Rect.cs
- CodeArgumentReferenceExpression.cs
- ObjectSpanRewriter.cs
- CompiledELinqQueryState.cs
- PrivilegedConfigurationManager.cs
- UnsafeNativeMethods.cs
- SafeNativeMethods.cs
- Faults.cs
- CompilerGeneratedAttribute.cs
- _TLSstream.cs
- ResXResourceReader.cs
- FormViewDeleteEventArgs.cs
- HtmlInputReset.cs
- NegatedCellConstant.cs
- DesignerView.cs
- ZipIOBlockManager.cs
- NavigatingCancelEventArgs.cs
- JournalNavigationScope.cs
- NumericExpr.cs
- BuildManager.cs
- ResourceSet.cs
- SqlGenerator.cs
- ManagementObjectCollection.cs
- RoleService.cs
- OleDbParameterCollection.cs
- ObjectItemCollection.cs
- LocalizableResourceBuilder.cs
- RoutingChannelExtension.cs
- ListenDesigner.cs
- BindingExpressionBase.cs
- ToggleProviderWrapper.cs
- SafeMILHandle.cs
- GeneralTransform2DTo3DTo2D.cs
- ZoneButton.cs
- XmlCharacterData.cs
- IntegerValidator.cs
- DataPagerField.cs
- PriorityBindingExpression.cs
- DbConnectionFactory.cs
- OutputCacheModule.cs
- ResXResourceWriter.cs
- WmlPanelAdapter.cs
- SamlSerializer.cs
- HMACSHA256.cs
- HttpCookieCollection.cs
- EventMappingSettingsCollection.cs
- ServiceChannelProxy.cs
- MasterPageCodeDomTreeGenerator.cs
- StylusShape.cs
- SqlDataReaderSmi.cs
- RC2CryptoServiceProvider.cs
- newinstructionaction.cs
- BezierSegment.cs
- XmlTextReaderImplHelpers.cs
- SpotLight.cs
- Debug.cs
- HMACSHA256.cs
- SetIterators.cs
- RootAction.cs
- TextTreeFixupNode.cs
- PropertyValueUIItem.cs
- ChangeBlockUndoRecord.cs
- HttpHandlerActionCollection.cs
- FixedSchema.cs
- DesigntimeLicenseContext.cs
- FormatPage.cs
- NavigationPropertyEmitter.cs
- MsmqBindingBase.cs
- CodeGeneratorOptions.cs
- PropertyGridView.cs
- ClientRoleProvider.cs
- ListControlConvertEventArgs.cs
- ContentElementAutomationPeer.cs
- Grammar.cs
- ContentType.cs
- UrlMapping.cs
- ListGeneralPage.cs
- UxThemeWrapper.cs
- SimpleTextLine.cs
- AsyncCompletedEventArgs.cs
- OrderedHashRepartitionStream.cs
- MediaTimeline.cs
- ResetableIterator.cs
- UpdateException.cs