Z
zuoc
Unregistered / Unconfirmed
GUEST, unregistred user!
function encryptstring(InString: string): string;
const
Template = 'sqOz8sJn9L5GjnZYe2n9sFtlXeM8l1V4V';
CharTable = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
var
i, CharVal: byte;
StartKey, MultKey, AddKey: Word;
begin
Result := '';
InString := InString + Chr(1);
StartKey := byte(InString[1]);
MultKey := StartKey * 100;
AddKey := StartKey * 512;
for i := 1 to length(Template) do
begin
CharVal := byte(InString[(i mod length(InString)) + 1]) xor (StartKey shr 8) xor byte(Template) + length(InString);
CharVal := (CharVal mod length(CharTable)) + 1;
Result := Result + CharTable[CharVal];
StartKey := (byte(Result) + StartKey) * MultKey + AddKey;
end;
end;
const
Template = 'sqOz8sJn9L5GjnZYe2n9sFtlXeM8l1V4V';
CharTable = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
var
i, CharVal: byte;
StartKey, MultKey, AddKey: Word;
begin
Result := '';
InString := InString + Chr(1);
StartKey := byte(InString[1]);
MultKey := StartKey * 100;
AddKey := StartKey * 512;
for i := 1 to length(Template) do
begin
CharVal := byte(InString[(i mod length(InString)) + 1]) xor (StartKey shr 8) xor byte(Template) + length(InString);
CharVal := (CharVal mod length(CharTable)) + 1;
Result := Result + CharTable[CharVal];
StartKey := (byte(Result) + StartKey) * MultKey + AddKey;
end;
end;