Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / infocard / Service / managed / Microsoft / InfoCards / RemoteCryptoDecryptRequest.cs / 1 / RemoteCryptoDecryptRequest.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace Microsoft.InfoCards { using System; using System.IO; using IDT=Microsoft.InfoCards.Diagnostics.InfoCardTrace; // // Summary: // Decrypt request for RpcCrypto // internal class RemoteCryptoDecryptRequest : RpcCryptoRequest { byte[] m_buffer; int m_index; int m_length; bool m_final; int m_flags; int m_hashAlg; byte[] m_hash; // // Summary: // Creates an RpcCrypto Decrypt request. // // Arguments: // context: The RpcCryptoContext used for this request // flags: The CryptDecrypt flags // final: Indicates final block. // buffer: The buffer that contains the data to decrypt // index: The index in the buffer to start decryption // length: The number of bytes to decrypt. // hashAlg: The ALG_ID for the hash. // hash: The hash value. The size depends on hashAlg. // public RemoteCryptoDecryptRequest( RpcCryptoContext context, int flags, bool final, byte[] buffer, int index, int length, int hashAlg, byte[] hashValue ) : base( context ) { m_buffer = buffer; m_length = length; m_index = index; m_flags = flags; m_final = final; m_hashAlg = hashAlg; m_hash = hashValue; } // // Summary: // Gets the name of the request. // public override string Name { get{ return "RpcCryptoDecryptRequest"; } } // // Summary: // Gets the full buffer, before send, it returns the input data, // after processing, it will contain the output buffer. // public byte[] GetBuffer() { return m_buffer; } // // Summary: // Get the length of the data to be marshalled for decrypt // public int Length { get{ return m_length; } } // // the index to start writing // public int Index { get{ return m_index; } } // // Summary: // Marshal the output arguments. // protected override void MarshalOutArgs( Stream stream ) { BinaryWriter writer = new BinaryWriter( stream ); writer.Write( m_flags ); writer.Write( m_final ); writer.Write( m_length ); writer.Write( m_buffer,m_index,m_length ); writer.Write( m_hashAlg ); Utility.SerializeBytes( writer, m_hash ); } // // Summary: // Marshal the return arguments. // protected override void MarshalReturnArgs( Stream stream ) { BinaryReader reader = new InfoCardBinaryReader( stream ); m_length = reader.ReadInt32(); reader.Read( m_buffer, m_index, m_length ); } } } // 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
- BindingContext.cs
- TextRangeEditTables.cs
- CultureInfoConverter.cs
- DateTimeConverter.cs
- HttpDictionary.cs
- NativeMethods.cs
- HandledEventArgs.cs
- Page.cs
- Win32NamedPipes.cs
- SqlBooleanizer.cs
- TextControlDesigner.cs
- CloseCryptoHandleRequest.cs
- XPathEmptyIterator.cs
- _HeaderInfo.cs
- CollectionChangeEventArgs.cs
- ToolStripArrowRenderEventArgs.cs
- CodeConstructor.cs
- ConfigurationSectionCollection.cs
- UInt32.cs
- ContentFilePart.cs
- OdbcUtils.cs
- DbTransaction.cs
- UpdateCommandGenerator.cs
- ObfuscateAssemblyAttribute.cs
- HandlerWithFactory.cs
- QueryContinueDragEvent.cs
- SecurityManager.cs
- SystemInformation.cs
- SymbolEqualComparer.cs
- LocalValueEnumerator.cs
- BitStream.cs
- XNodeSchemaApplier.cs
- CorrelationToken.cs
- TableLayoutPanelBehavior.cs
- HtmlInputReset.cs
- TemplateAction.cs
- odbcmetadatacolumnnames.cs
- EntityDataSourceSelectingEventArgs.cs
- DescendantBaseQuery.cs
- MergeFailedEvent.cs
- WinEventWrap.cs
- BitmapEffectDrawing.cs
- PrintDialogException.cs
- HierarchicalDataTemplate.cs
- TextAnchor.cs
- SectionInformation.cs
- AppAction.cs
- ContextDataSourceContextData.cs
- XmlILModule.cs
- DayRenderEvent.cs
- OAVariantLib.cs
- XPathConvert.cs
- Size3DValueSerializer.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- SelectedDatesCollection.cs
- RenderData.cs
- Int32Rect.cs
- XmlNode.cs
- DesignerCapabilities.cs
- IdnMapping.cs
- Int64AnimationUsingKeyFrames.cs
- ProfileGroupSettings.cs
- HeaderLabel.cs
- CircleEase.cs
- XmlConvert.cs
- ScriptRef.cs
- PasswordPropertyTextAttribute.cs
- DataGridPagerStyle.cs
- OrderByQueryOptionExpression.cs
- XmlEncodedRawTextWriter.cs
- WindowsListBox.cs
- ToolStripDropTargetManager.cs
- MDIControlStrip.cs
- ObjectRef.cs
- WebPartConnectionsDisconnectVerb.cs
- ToolStripSettings.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- XmlMembersMapping.cs
- DrawItemEvent.cs
- SoapIgnoreAttribute.cs
- ExpressionVisitorHelpers.cs
- DragEvent.cs
- CompositeCollectionView.cs
- WebPartActionVerb.cs
- SvcMapFile.cs
- Transform3DCollection.cs
- ToolStripLabel.cs
- FormViewPageEventArgs.cs
- TaskHelper.cs
- TargetControlTypeAttribute.cs
- RSAOAEPKeyExchangeDeformatter.cs
- TextTrailingCharacterEllipsis.cs
- ColorConverter.cs
- MailMessage.cs
- ThicknessKeyFrameCollection.cs
- CannotUnloadAppDomainException.cs
- CookielessHelper.cs
- TreeNodeEventArgs.cs
- XslAst.cs
- KerberosTicketHashIdentifierClause.cs