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)); }