Generates a 16 byte Unique Identification code of a computer Example: 4876-8DB5-EE85-69D3-FE52-8CF7-395D-2EA9
Beispiel #1
0
        private static string getInitVector()
        {
            // This constant string is used as a "salt" value for the PasswordDeriveBytes function calls.
            // This size of the IV (in bytes) must = (keysize / 8).  Default keysize is 256, so the IV must be
            // 32 bytes long.  Using a 16 character string here gives us 32 bytes when converted to a byte array.
            string fingerPrint = FingerPrint.Value(FingerPrint.FingerPart.BASE | FingerPrint.FingerPart.CPU, true);

            return(fingerPrint.Substring(0, 16));
        }