hi,
can anyone help me convert this code to vb.net?
i tried using conversion tools but gives me an error on the syntax.
thanks.
can anyone help me convert this code to vb.net?
VB.NET:
private string GenerateSalt() {
byte[] buf = new byte[SALT_SIZE_IN_BYTES];
(new RNGCryptoServiceProvider()).GetBytes(buf);
return Convert.ToBase64String(buf);
}
VB.NET:
Private Function GenerateSalt() As String
Dim buf As Byte() = New Byte(SALT_SIZE_IN_BYTES - 1) {}
[I](New RNGCryptoServiceProvider()).GetBytes(buf)[/I]
Return Convert.ToBase64String(buf)
End Function
thanks.