CSharpTest.Net
HexStream.Transform Constructor
See Also  Example Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Formatting Namespace > HexStream.Transform Class : HexStream.Transform Constructor

mode

Glossary Item Box

Provides a crypto-transform used to read/write to a stream of hexidecimal characters.

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal mode As CryptoStreamMode _
)
C# 
public HexStream.Transform( 
   CryptoStreamMode mode
)

Parameters

mode

Example

Library/Library.Test/TestHexEncoding.cs

C#Copy Code
using (ICryptoTransform xform = new HexStream.Transform(CryptoStreamMode.Read))
{
    Assert.AreEqual(2, xform.InputBlockSize);
    Assert.AreEqual(1, xform.OutputBlockSize);
    Assert.AreEqual(true, xform.CanReuseTransform);
    Assert.AreEqual(true, xform.CanTransformMultipleBlocks);
}
using (ICryptoTransform xform = new HexStream.Transform(CryptoStreamMode.Write))
{
    Assert.AreEqual(1, xform.InputBlockSize);
    Assert.AreEqual(2, xform.OutputBlockSize);
    Assert.AreEqual(true, xform.CanReuseTransform);
    Assert.AreEqual(true, xform.CanTransformMultipleBlocks);
}
VB.NETCopy Code
Using xform As ICryptoTransform = New HexStream.Transform(CryptoStreamMode.Read)
    Assert.AreEqual(2, xform.InputBlockSize)
    Assert.AreEqual(1, xform.OutputBlockSize)
    Assert.AreEqual(True, xform.CanReuseTransform)
    Assert.AreEqual(True, xform.CanTransformMultipleBlocks)
End Using
Using xform As ICryptoTransform = New HexStream.Transform(CryptoStreamMode.Write)
    Assert.AreEqual(1, xform.InputBlockSize)
    Assert.AreEqual(2, xform.OutputBlockSize)
    Assert.AreEqual(True, xform.CanReuseTransform)
    Assert.AreEqual(True, xform.CanTransformMultipleBlocks)
End Using

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys