jQuery in Action, 3rd edition
The moose likes Java in General and the fly likes Machine id for encryption Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Machine id for encryption" Watch "Machine id for encryption" New topic

Machine id for encryption

Quentin Chan

Joined: Jul 08, 2003
Posts: 5
Hi all,
I need to create a java program that will encrypt a file (maybe using twofish) based on unique ID for the key. (I was thinking something like our computer machine ID)
So no one can decrypt the file from other computer (unless they know my machine ID).
I've been searching the API but couldn't get it.
Has anyone ever done this before ?
Any other suggestion of doing this ?
Many thanks in advance
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
I don't know of any API that will do that. Not all machines have unique IDs and it is obviously an OS and hardware specific issue. What kind of files do you want to encrypt?

Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Quentin Chan

Joined: Jul 08, 2003
Posts: 5
It is really simple text file.
The file will contain userId and password to login to server.
I need to create a java app that will encrypt that store id & pwd.
My logon program will decrypt that file and use it for login.
I agree. Here's the link: http://aspose.com/file-tools
subject: Machine id for encryption
jQuery in Action, 3rd edition