I am working on an application that I developed a security layer for. It uses the hardware ID of the hard drive, MAC address and another hardware serial key, to lock the software a particular piece of hardware.
I came across sites online, that said I should use fairly weird names for the procedures/functions/variables in the the security layer. For instance
function XtDmat: Boolean;
var
x3mat: string;
hhiTms: Interger;
begin
Result := False;
x3mat := GWindosColr; //this returns the HD ID
hhiTms := GalilDriverID; //this gets a controller ID
if (t5gFx=x3mat) and (hhiTms=f4teXX) then Result := True; //match IDs with those saved in the registry
end;
And for the messages dialog box:
procedure Tfrm_MainWindow.mxProtectorExpiration( Sender: TObject );
begin
lbl_Remaining.Caption := GetClassPath('xsedfers34;;''kd'); // encrypted value decryted and shown '0 days remained'
lbl_Message.Caption := GetClassPath('qwe23vftTxxx ii gtr'); //decryt and show 'This license has expired'
btn_Go.Enabled := False;
end;
I did this because I used Delphi DEDE to decompile my code and found even the registry key 'HCKU\software\myapplication' to be in plain sight.
Now, however, it has become difficult to
- explain to my fellow team mates, why I did this (meaning the names),
- document as the names do not make sense,
- debug which gives me headaches.
Can anyone suggest a good way to document this type of code in this type of situation. So the code becomes easier to, but is still diffcult to decompile. Alternatively, could one suggest a obfuscator for Delphi.