|
-
December 7th, 1999, 12:42 PM
#1
Delphi to VB Conversion Help
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;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|