I just looked at the code and 99% of it should work in Vb.NET..

the only 2 lines of concern is the Unicode conversion (find the correct .NET function) and the call to the Encryption (depend on where it called from)...