Provides a crypto-transform used to read/write to a stream of base-64 characters.
Syntax
Example
Library/Library.Test/TestSafe64Encoding.cs
C# | Copy Code |
---|
using (ICryptoTransform xform = new Base64Stream.Transform(CryptoStreamMode.Read))
{
Assert.AreEqual(4, xform.InputBlockSize);
Assert.AreEqual(3, xform.OutputBlockSize);
Assert.AreEqual(true, xform.CanReuseTransform);
Assert.AreEqual(true, xform.CanTransformMultipleBlocks);
}
using (ICryptoTransform xform = new Base64Stream.Transform(CryptoStreamMode.Write))
{
Assert.AreEqual(3, xform.InputBlockSize);
Assert.AreEqual(4, xform.OutputBlockSize);
Assert.AreEqual(true, xform.CanReuseTransform);
Assert.AreEqual(true, xform.CanTransformMultipleBlocks);
} |
VB.NET | Copy Code |
---|
Using xform As ICryptoTransform = New Base64Stream.Transform(CryptoStreamMode.Read)
Assert.AreEqual(4, xform.InputBlockSize)
Assert.AreEqual(3, xform.OutputBlockSize)
Assert.AreEqual(True, xform.CanReuseTransform)
Assert.AreEqual(True, xform.CanTransformMultipleBlocks)
End Using
Using xform As ICryptoTransform = New Base64Stream.Transform(CryptoStreamMode.Write)
Assert.AreEqual(3, xform.InputBlockSize)
Assert.AreEqual(4, 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