Реферат: Арифметика на службе защиты
write('Enter your INN:'); readln(INN);
write('Enter your Code:'); readln(Code);
{ Make extended "password" }
fillchar(ExtPassData,sizeof(tExtPassData),' ');
move(INN[1],ExtPassData.INN,length(INN));
move(TypeSetup[1],ExtPassData.TypeSetup,length(TypeSetup));
move(Code[1],ExtPassData.Code,length(Code));
move(Version[1],ExtPassData.Version,length(Version));
{ Create control sum }
PassByte:=0;
sum:=1;
for i:=1 to sizeof(tExtPassData) do
begin
move(ExtPassData.INN[i],PassByte,1);
inc(sum,(i*i)*(PassByte*PassByte));
if i > sizeof(ExtPassData.INN) then
while sum > 1000000 do dec(sum,1000000);
end;
writeln('Your password for full version is "',sum,'". Enjoy it! ;)')