You've already forked lazarus-dcpcrypt
mirror of
https://git.code.sf.net/p/lazarus-ccr/dcpcrypt
synced 2025-07-12 23:10:12 +02:00
Fixed compiler errors under 64-bit FPC using Linux.
This commit is contained in:
@ -217,10 +217,10 @@ begin
|
||||
end;
|
||||
a:= a xor l_key[128]; b:= b xor l_key[128+1]; c:= c xor l_key[128+2]; d:= d xor l_key[128+3];
|
||||
|
||||
PDWord(longword(@OutData)+ 0)^:= a;
|
||||
PDWord(longword(@OutData)+ 4)^:= b;
|
||||
PDWord(longword(@OutData)+ 8)^:= c;
|
||||
PDWord(longword(@OutData)+12)^:= d;
|
||||
PDWord(PtrUInt(@OutData)+ 0)^:= a;
|
||||
PDWord(PtrUInt(@OutData)+ 4)^:= b;
|
||||
PDWord(PtrUInt(@OutData)+ 8)^:= c;
|
||||
PDWord(PtrUInt(@OutData)+12)^:= d;
|
||||
end;
|
||||
|
||||
procedure TDCP_serpent.DecryptECB(const InData; var OutData);
|
||||
@ -272,10 +272,10 @@ begin
|
||||
Dec(i,8);
|
||||
end;
|
||||
|
||||
PDWord(longword(@OutData)+ 0)^:= a;
|
||||
PDWord(longword(@OutData)+ 4)^:= b;
|
||||
PDWord(longword(@OutData)+ 8)^:= c;
|
||||
PDWord(longword(@OutData)+12)^:= d;
|
||||
PDWord(PtrUInt(@OutData)+ 0)^:= a;
|
||||
PDWord(PtrUInt(@OutData)+ 4)^:= b;
|
||||
PDWord(PtrUInt(@OutData)+ 8)^:= c;
|
||||
PDWord(PtrUInt(@OutData)+12)^:= d;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
@ -482,10 +482,10 @@ begin
|
||||
x[0]:= (x[0] shr 1) or (x[0] shl 31);
|
||||
Inc(i,2);
|
||||
end;
|
||||
PDWord(longword(@OutData)+ 0)^:= x[2] xor SubKeys[OUTPUTWHITEN];
|
||||
PDWord(longword(@OutData)+ 4)^:= x[3] xor SubKeys[OUTPUTWHITEN+1];
|
||||
PDWord(longword(@OutData)+ 8)^:= x[0] xor SubKeys[OUTPUTWHITEN+2];
|
||||
PDWord(longword(@OutData)+12)^:= x[1] xor SubKeys[OUTPUTWHITEN+3];
|
||||
PDWord(PtrUInt(@OutData)+ 0)^:= x[2] xor SubKeys[OUTPUTWHITEN];
|
||||
PDWord(PtrUInt(@OutData)+ 4)^:= x[3] xor SubKeys[OUTPUTWHITEN+1];
|
||||
PDWord(PtrUInt(@OutData)+ 8)^:= x[0] xor SubKeys[OUTPUTWHITEN+2];
|
||||
PDWord(PtrUInt(@OutData)+12)^:= x[1] xor SubKeys[OUTPUTWHITEN+3];
|
||||
end;
|
||||
|
||||
procedure TDCP_twofish.DecryptECB(const InData; var OutData);
|
||||
@ -522,10 +522,10 @@ begin
|
||||
x[3]:= (x[3] shr 1) or (x[3] shl 31);
|
||||
Dec(i,2);
|
||||
end;
|
||||
PDWord(longword(@OutData)+ 0)^:= X[0] xor SubKeys[INPUTWHITEN];
|
||||
PDWord(longword(@OutData)+ 4)^:= X[1] xor SubKeys[INPUTWHITEN+1];
|
||||
PDWord(longword(@OutData)+ 8)^:= X[2] xor SubKeys[INPUTWHITEN+2];
|
||||
PDWord(longword(@OutData)+12)^:= X[3] xor SubKeys[INPUTWHITEN+3];
|
||||
PDWord(PtrUInt(@OutData)+ 0)^:= X[0] xor SubKeys[INPUTWHITEN];
|
||||
PDWord(PtrUInt(@OutData)+ 4)^:= X[1] xor SubKeys[INPUTWHITEN+1];
|
||||
PDWord(PtrUInt(@OutData)+ 8)^:= X[2] xor SubKeys[INPUTWHITEN+2];
|
||||
PDWord(PtrUInt(@OutData)+12)^:= X[3] xor SubKeys[INPUTWHITEN+3];
|
||||
end;
|
||||
|
||||
procedure PreCompMDS;
|
||||
|
@ -40,7 +40,9 @@ type
|
||||
Pword= ^word;
|
||||
Pdword= ^dword;
|
||||
Pint64= ^int64;
|
||||
{$IFNDEF FPC}
|
||||
dword= longword;
|
||||
{$ENDIF}
|
||||
Pwordarray= ^Twordarray;
|
||||
Twordarray= array[0..19383] of word;
|
||||
Pdwordarray= ^Tdwordarray;
|
||||
|
Reference in New Issue
Block a user