Visual Basic (Declaration) | |
---|---|
Public Class Salt Inherits CSharpTest.Net.Bases.Equatable(Of Salt) |
C# | |
---|---|
public class Salt : CSharpTest.Net.Bases.Equatable<Salt> |
Library/Library.Test/TestSalt.cs
C# | Copy Code |
---|---|
Salt s = new Salt(Salt.Size.b64); byte[] testData = new byte[8]; byte[] test1 = new SaltedData(s, testData).ToArray(); Assert.AreEqual(16, test1.Length); byte[] test2 = IOStream.ReadAllBytes(new SaltedData(s, testData).ToStream()); Assert.AreEqual(16, test2.Length); byte[] test3 = IOStream.ReadAllBytes(SaltedData.CombineStream(s, new MemoryStream(testData))); Assert.AreEqual(16, test3.Length); Assert.AreEqual(test1, test2); Assert.AreEqual(test1, test3); Assert.AreEqual(test2, test3); |
VB.NET | Copy Code |
---|---|
Dim s As New Salt(Salt.Size.b64) Dim testData As Byte() = New Byte(8) {} Dim test1 As Byte() = New SaltedData(s, testData).ToArray() Assert.AreEqual(16, test1.Length) Dim test2 As Byte() = IOStream.ReadAllBytes(New SaltedData(s, testData).ToStream()) Assert.AreEqual(16, test2.Length) Dim test3 As Byte() = IOStream.ReadAllBytes(SaltedData.CombineStream(s, New MemoryStream(testData))) Assert.AreEqual(16, test3.Length) Assert.AreEqual(test1, test2) Assert.AreEqual(test1, test3) Assert.AreEqual(test2, test3) |
System.Object
CSharpTest.Net.Bases.Equatable<T>
CSharpTest.Net.Crypto.Salt
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
Reference
Salt MembersCSharpTest.Net.Crypto Namespace
LocalHostKey LocalHostKey.WithSalt(Salt)
AESCryptoKey PasswordKey.CreateKey(Salt)
AESCryptoKey PasswordKey.CreateKey(Salt,Byte[])
Salt PasswordKey.Salt
PasswordHash Password.CreateHash(Salt)
Salt PasswordHash.Salt
Stream SaltedData.CombineStream(Salt,Stream)
Salt SaltedData.Salt