Generating and Compressing Computer ID

Hi Experts,

To protect my software, i'm trying to generate a unique computer id. I'm trying to combine Hardisk ID, Windows Key, MAC Address etc. My question is, after i retrieved all the above information, how should i compress all the information into 25 character computer id?

Thanks in advance
Reynaldi
LVL 2
reynaldioAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Mahdi78Connect With a Mentor Commented:
You will find all what want about your need in OnGuard library
http://sourceforge.net/projects/tponguard/
0
 
Mahdi78Connect With a Mentor Commented:
As short way to get Machine ID without installing package, do the following

1- Add the folder OnGuard\source to your project search path.
2- Add OnGuard unit to uses clause.
3- Create the following function to get machine id


uses OnGuard;

function GetMachineID: String;
begin
Result := IntToStr(ABS(CreateMachineID([midUser,
      midSystem, {midNetwork,} midDrives])));
end;

Open in new window

0
 
Mahdi78Commented:
If you're going to use your method, you can collect information and compress them by this function


uses IdHashMessageDigest;

function CompressID(str:string):string;
var
  md5 : TIdHashMessageDigest5;
begin
  md5 := TIdHashMessageDigest5.Create;
  try
    Result:=copy(md5.HashStringAsHex(str), 1 , 25);
  finally
    md5.Free;
  end;
end;

Open in new window

0
 
mlmccCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
All Courses

From novice to tech pro — start learning today.