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:
@ -24,8 +24,8 @@
|
|||||||
{* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *}
|
{* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *}
|
||||||
{* DEALINGS IN THE SOFTWARE. *}
|
{* DEALINGS IN THE SOFTWARE. *}
|
||||||
{******************************************************************************}
|
{******************************************************************************}
|
||||||
unit DCPserpent;
|
unit DCPserpent;
|
||||||
|
|
||||||
{$MODE Delphi}
|
{$MODE Delphi}
|
||||||
|
|
||||||
interface
|
interface
|
||||||
@ -217,10 +217,10 @@ begin
|
|||||||
end;
|
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];
|
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(PtrUInt(@OutData)+ 0)^:= a;
|
||||||
PDWord(longword(@OutData)+ 4)^:= b;
|
PDWord(PtrUInt(@OutData)+ 4)^:= b;
|
||||||
PDWord(longword(@OutData)+ 8)^:= c;
|
PDWord(PtrUInt(@OutData)+ 8)^:= c;
|
||||||
PDWord(longword(@OutData)+12)^:= d;
|
PDWord(PtrUInt(@OutData)+12)^:= d;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDCP_serpent.DecryptECB(const InData; var OutData);
|
procedure TDCP_serpent.DecryptECB(const InData; var OutData);
|
||||||
@ -272,10 +272,10 @@ begin
|
|||||||
Dec(i,8);
|
Dec(i,8);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
PDWord(longword(@OutData)+ 0)^:= a;
|
PDWord(PtrUInt(@OutData)+ 0)^:= a;
|
||||||
PDWord(longword(@OutData)+ 4)^:= b;
|
PDWord(PtrUInt(@OutData)+ 4)^:= b;
|
||||||
PDWord(longword(@OutData)+ 8)^:= c;
|
PDWord(PtrUInt(@OutData)+ 8)^:= c;
|
||||||
PDWord(longword(@OutData)+12)^:= d;
|
PDWord(PtrUInt(@OutData)+12)^:= d;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
{* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *}
|
{* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *}
|
||||||
{* DEALINGS IN THE SOFTWARE. *}
|
{* DEALINGS IN THE SOFTWARE. *}
|
||||||
{******************************************************************************}
|
{******************************************************************************}
|
||||||
unit DCPtwofish;
|
unit DCPtwofish;
|
||||||
|
|
||||||
{$MODE Delphi}
|
{$MODE Delphi}
|
||||||
|
|
||||||
interface
|
interface
|
||||||
@ -482,10 +482,10 @@ begin
|
|||||||
x[0]:= (x[0] shr 1) or (x[0] shl 31);
|
x[0]:= (x[0] shr 1) or (x[0] shl 31);
|
||||||
Inc(i,2);
|
Inc(i,2);
|
||||||
end;
|
end;
|
||||||
PDWord(longword(@OutData)+ 0)^:= x[2] xor SubKeys[OUTPUTWHITEN];
|
PDWord(PtrUInt(@OutData)+ 0)^:= x[2] xor SubKeys[OUTPUTWHITEN];
|
||||||
PDWord(longword(@OutData)+ 4)^:= x[3] xor SubKeys[OUTPUTWHITEN+1];
|
PDWord(PtrUInt(@OutData)+ 4)^:= x[3] xor SubKeys[OUTPUTWHITEN+1];
|
||||||
PDWord(longword(@OutData)+ 8)^:= x[0] xor SubKeys[OUTPUTWHITEN+2];
|
PDWord(PtrUInt(@OutData)+ 8)^:= x[0] xor SubKeys[OUTPUTWHITEN+2];
|
||||||
PDWord(longword(@OutData)+12)^:= x[1] xor SubKeys[OUTPUTWHITEN+3];
|
PDWord(PtrUInt(@OutData)+12)^:= x[1] xor SubKeys[OUTPUTWHITEN+3];
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDCP_twofish.DecryptECB(const InData; var OutData);
|
procedure TDCP_twofish.DecryptECB(const InData; var OutData);
|
||||||
@ -522,10 +522,10 @@ begin
|
|||||||
x[3]:= (x[3] shr 1) or (x[3] shl 31);
|
x[3]:= (x[3] shr 1) or (x[3] shl 31);
|
||||||
Dec(i,2);
|
Dec(i,2);
|
||||||
end;
|
end;
|
||||||
PDWord(longword(@OutData)+ 0)^:= X[0] xor SubKeys[INPUTWHITEN];
|
PDWord(PtrUInt(@OutData)+ 0)^:= X[0] xor SubKeys[INPUTWHITEN];
|
||||||
PDWord(longword(@OutData)+ 4)^:= X[1] xor SubKeys[INPUTWHITEN+1];
|
PDWord(PtrUInt(@OutData)+ 4)^:= X[1] xor SubKeys[INPUTWHITEN+1];
|
||||||
PDWord(longword(@OutData)+ 8)^:= X[2] xor SubKeys[INPUTWHITEN+2];
|
PDWord(PtrUInt(@OutData)+ 8)^:= X[2] xor SubKeys[INPUTWHITEN+2];
|
||||||
PDWord(longword(@OutData)+12)^:= X[3] xor SubKeys[INPUTWHITEN+3];
|
PDWord(PtrUInt(@OutData)+12)^:= X[3] xor SubKeys[INPUTWHITEN+3];
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure PreCompMDS;
|
procedure PreCompMDS;
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
{* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *}
|
{* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *}
|
||||||
{* DEALINGS IN THE SOFTWARE. *}
|
{* DEALINGS IN THE SOFTWARE. *}
|
||||||
{******************************************************************************}
|
{******************************************************************************}
|
||||||
unit DCPcrypt2;
|
unit DCPcrypt2;
|
||||||
|
|
||||||
{$MODE Delphi}
|
{$MODE Delphi}
|
||||||
|
|
||||||
interface
|
interface
|
||||||
@ -40,7 +40,9 @@ type
|
|||||||
Pword= ^word;
|
Pword= ^word;
|
||||||
Pdword= ^dword;
|
Pdword= ^dword;
|
||||||
Pint64= ^int64;
|
Pint64= ^int64;
|
||||||
|
{$IFNDEF FPC}
|
||||||
dword= longword;
|
dword= longword;
|
||||||
|
{$ENDIF}
|
||||||
Pwordarray= ^Twordarray;
|
Pwordarray= ^Twordarray;
|
||||||
Twordarray= array[0..19383] of word;
|
Twordarray= array[0..19383] of word;
|
||||||
Pdwordarray= ^Tdwordarray;
|
Pdwordarray= ^Tdwordarray;
|
||||||
|
Reference in New Issue
Block a user