Sets or Gets the IV used when deriving the encryption key
Syntax
Visual Basic (Declaration) | |
---|
Public Overridable Property IV As Byte() |
C# | |
---|
public virtual byte[] IV {get; set;} |
Example
Library/Library.Test/TestPassword.cs
C# | Copy Code |
---|
using (PasswordKey key = new PasswordKey("bla"))
{
Assert.AreEqual(AESCryptoKey.ProcessDefaultIV, key.IV);
byte[] newIv = Guid.NewGuid().ToByteArray();
key.IV = newIv;
Assert.AreEqual(newIv, key.IV);
Assert.AreEqual(newIv, key.CreateKey().IV);
} |
VB.NET | Copy Code |
---|
Using key As New PasswordKey("bla")
Assert.AreEqual(AESCryptoKey.ProcessDefaultIV, key.IV)
Dim newIv As Byte() = Guid.NewGuid().ToByteArray()
key.IV = newIv
Assert.AreEqual(newIv, key.IV)
Assert.AreEqual(newIv, key.CreateKey().IV)
End Using |
Requirements
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
See Also