CSharpTest.Net
Reset Method
See Also  Example Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.Crypto Namespace > IPasswordDerivedBytes Interface : Reset Method

Glossary Item Box

Resets the state of the operation.

Syntax

Visual Basic (Declaration) 
Sub Reset() 
C# 
void Reset()

Example

Library/Library.Test/TestHashDerivedBytes.cs

C#Copy Code
using (IPasswordDerivedBytes pd = DerivedBytes(TEST_PASSWORD))
{
    pd.IterationCount = 10;
    byte[] bytes = pd.GetBytes(1000);
    Assert.AreNotEqual(bytes, pd.GetBytes(bytes.Length));
    pd.Reset();
    Assert.AreEqual(bytes, pd.GetBytes(bytes.Length));
}
VB.NETCopy Code
Using pd As IPasswordDerivedBytes = DerivedBytes(TEST_PASSWORD)
    pd.IterationCount = 10
    Dim bytes As Byte() = pd.GetBytes(1000)
    Assert.AreNotEqual(bytes, pd.GetBytes(bytes.Length))
    pd.Reset()
    Assert.AreEqual(bytes, pd.GetBytes(bytes.Length))
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