Solved

Generating and Compressing Computer ID

Posted on 2011-09-16
5
733 Views
Last Modified: 2012-05-12
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
0
Comment
Question by:reynaldio
  • 3
5 Comments
 
LVL 9

Accepted Solution

by:
Mahdi78 earned 500 total points
Comment Utility
You will find all what want about your need in OnGuard library
http://sourceforge.net/projects/tponguard/
0
 
LVL 9

Assisted Solution

by:Mahdi78
Mahdi78 earned 500 total points
Comment Utility
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
 
LVL 9

Expert Comment

by:Mahdi78
Comment Utility
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
 
LVL 100

Expert Comment

by:mlmcc
Comment Utility
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

You cannot be 100% sure that you can protect your organization against crypto ransomware but you can lower down the risk and impact of the infection.
By default, Carbonite Server Backup manages your encryption key for you using Advanced Encryption Standard (AES) 128-bit encryption. If you choose to manage your private encryption key, your backups will be encrypted using AES 256-bit encryption.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now