Last active
January 18, 2017 15:02
-
-
Save turbo/dbf59a8d9b4b857b3f1d5bf480526285 to your computer and use it in GitHub Desktop.
Hardware Fingerprint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static string Value() { | |
if (string.IsNullOrEmpty(FingerPrint.fingerPrint)) { | |
object guid = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32).OpenSubKey("SOFTWARE\\Microsoft\\Cryptography").GetValue("MachineGuid"); | |
if (guid == null) { | |
guid = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64).OpenSubKey("SOFTWARE\\Microsoft\\Cryptography").GetValue("MachineGuid"); | |
FingerPrint.fingerPrint = guid.ToString(); | |
} else FingerPrint.fingerPrint = guid.ToString(); | |
} | |
return FingerPrint.fingerPrint; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment