This question already has answers here:
Is WMI a good way to making a hardware fingerprint?
(2 answers)
Closed 9 years ago.
I am creating an licencing system for my windows application and for that i need to create an unique computer identity .
for that i am using
Processor ID and Processor Family
Is this sufficient to create a unique hardware fingerprint or not.
i am little bit confused that Processor ID is unique for all computers or not.
Please provide me an beater idea on that
Thanks
The ProcessorID or CPUID are for identifying the model and feature set of the processor (ARM, x86/x64).
The Pentium III supported a Processor Serial Number (PSN). In addition to only being supported on the Pentium III (and Transmeta's Efficeon and Crusoe processors), the feature had to be enabled in BIOS and raised privacy concerns.
So no, ProcessorID is not unique for all of computers. Additionally, it
is very likely to not be unique across computers in your company
(since many organizations buy multiple computers of the same model).
This question may help you
I know this answer will be better as comment. But I am new and too low to post comments at the moment :(
Related
This question already has answers here:
C# - Get mac address in Universal Apps
(3 answers)
Closed 3 years ago.
I wanted to use the MAC Address of the device as a unique identifier, but this isn't exposed in the UWP API. The closest thing I can find is:
hostname.IPInformation.NetworkAdapter.NetworkAdapterId;
It seems to be the same value (after app restart and PC restart) but I don't know if it's robustly persistent. The docs don't seem to say, does anyone know what this ID actually consists of? Is it safe to use this as a reliable means of device identification?
If not, can someone recommend something?
Many thanks,
Peter
How is the NetworkAdapter.NetworkAdapterID generated in UWP
Derive from this case,
No, the NetworkAdapterId value is a GUID and has nothing to do with the machine MAC address. You cannot get the MAC adress of the computer through WinRT APIs exposed for the Windows Store application type.
This question already has answers here:
How can I create a product key for my C# application?
(14 answers)
Closed 9 years ago.
How can i generate serial key for the C# Desktop Application (Windows application) ?
E.g. Software expires after a month. (Trial version).
If user changes Machine time then hoe could it be possible to validate the software for the specified time ?
There are many ways you can generate serial keys for your application in C#. You will most likely have make some sort of trade off between the simplicity (ie. the length of the key, readability, etc), and the security of a particular system.
I would recommend Software Protector(http://softwareprotector.clizware.net/) and SKGL (https://skgl.codeplex.com/). Software Protector would give you a user interface where you can generate your keys and SKGL API would allow you to validate those inside your own application. If you like, you can also include the source code of SKGL API (currently available in C# and VB.NET). You can set a time limit from 0 to 999, 8 custom features, and machine locking.
Regarding the time changing issue, the only way I see is to look up the local time (for that time zone) online using time.windows.com and check if that is equal to the current time on the pc. Please check this article: https://skgl.codeplex.com/discussions/472444
Please note that I am developing both SKGL API and Software Protector, which means that my answer might have a slight tendency!
This question already has answers here:
Is a GUID unique 100% of the time?
(24 answers)
Are GUID collisions possible?
(19 answers)
Closed 9 years ago.
I generate keys for my software as:
Guid.NewGuid().ToString();
that returns something like: 15c6bd70-8d3c-42d0-bb24-40da6e08ed9d
anyways everytime someone purchases a new software I generate a new key. can it be possible that I generate the same key twice? Everytime someone purchase the software I call the method: Guid.NewGuid().ToString() Should I append a counter at the end of each guid to be 100% sure that there cannot be duplicates?
Edit
A constructor of the Guid class takes a byte array of 16 bytes as a parameter. If you serialize the current date (8 bytes) then append another 8 random bytes to the constructor of the GUID will that be 100% secure? I am just asking for learning based on your answers I will probably just have Guid.NewGuid()
An excerpt from one of the best blog series ever written about the Guid:
There are a number of possible strategies for making a unique GUID, and in fact information about the strategy used is encoded in the first four bits of the third "group"; almost every GUID you see will be of the form {xxxxxxxx-xxxx-1xxx-xxxx-xxxxxxxxxxxx} or {xxxxxxxx-xxxx-4xxx-xxxx-xxxxxxxxxxxx}.
If there is a one in that place then the algorithm used to guarantee uniqueness is essentially a variation on the ISBN strategy. The GUID is guaranteed to be unique "in space" by choosing some of the bits as the MAC address of the network card in the machine. (The tricky problem of ensuring that no two network cards in the world have the same MAC address is solved somehow by someone else; how that problem is solved, we don't particularly care. The cost of solving that problem is passed on to you, the consumer, in the purchase cost of the network card.)
In short, it's very unlikely that they would ever collide.
Yes, it's possible, but extremely unlikely. The probability for a GUID collision is about as likely as a bit in the GUID changing spontaneously in memory, and that kind of thing is not something that you normally worry about.
You can already be 100% sure, that is of course if you dont mean that you need to be 100.000000000000000000000000000000000000% sure.
Just use the Guid.. no need to append anything. Unless you expect to sell more copies than there are atoms in the universe (unlikely).
This question already has answers here:
How to detect when laptop power cable has been disconnected?
(7 answers)
Closed 9 years ago.
I'd like to call an API to know if the laptop is plugged into the wall. If it is I want to defer some CPU intense processing in order to save battery
I'd also like to be informed when this status changes (meaning when the user plugs the charger back in I'd like to be alerted)
in Win32 I'd probally go this route - RegisterPowerSettingNotification
is there something like this in .NET/C#?
I believe you can check SystemInformation.PowerStatus to see if it's on battery or not.
Boolean isRunningOnBattery =
(System.Windows.Forms.SystemInformation.PowerStatus.PowerLineStatus ==
PowerLineStatus.Offline);
Edit: In addition to the above, there's also a System.Windows.Forms.PowerStatus class. One of its methods is PowerLineStatus, which will equal PowerLineStatus.Online if it's on AC Power.
This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Is a GUID unique 100% of the time?
Basically:
Guid.NewGuid() - Does it loop around or generate through some algorithm?
I want to use Guid because it offers 2^128 possibilities. According to the MSDN:
The chance that the value of the new
Guid will be all zeros or equal to any
other Guid is very low.
The problem is they don't say why it is low. Is it low because the chances are unlikely or is it low because it is unlikely to loop all the way around?
This is a pseudo unique value. The algorithm exists of course, but the probability of getting the same value twice is super small.
They certainly can collide, but MS implementation is quite stable and uses several iterations of hashing (including BIOS timers etc), so that the value is something you can actually rely on.
Update.
There are many more GUID/UUID implementations performed for other purposes (e.g. Guid.comb algorithm for DB surrogate keys) - they actually can collide and I faced this myself in high loaded environments.
Check out: http://en.wikipedia.org/wiki/Globally_unique_identifier#Algorithm
In the OSF-specified algorithm for
generating new (V1) GUIDs, the user's
network card MAC address is used as a
base for the last group of GUID
digits... Most
of the other digits are based on the
time while generating the GUID.