Provides a crypto-transform used to read/write to a stream of base-64 characters while replacing '+' with '-' and '/' with '_' and ommitting padding.
Syntax
Visual Basic (Declaration) | |
---|
Public Class Safe64Stream.Transform |
C# | |
---|
public class Safe64Stream.Transform |
Example
Library/Library.Test/TestSafe64Encoding.cs
C# | Copy Code |
---|
using (ICryptoTransform xform = new Safe64Stream.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 Safe64Stream.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 Safe64Stream.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 Safe64Stream.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 |
Inheritance Hierarchy
Requirements
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
See Also