I need these two functions converted to VB...
Can someone help, please???

function Decrypt(const S: String; Key: Word): String;
var
I: byte;
begin
SetLength(Result,Length(S));
for I := 1 to Length(S) do
begin
Result[i] := char(byte(S[i]) xor (Key shr 8));
Key := (byte(S[i]) + Key) * C1 + C2;
end;
end;


function Encrypt(const S: String; Key: Word): String;
var
I: byte;
begin
SetLength(Result,Length(S));
for I := 1 to Length(S) do
begin
Result[i] := char(byte(S[i]) xor (Key shr 8));
Key := (byte(Result[i]) + Key) * C1 + C2;
end;
end;