winUniqueIdentifier method

Future<String> winUniqueIdentifier()

A unique device identifier.

ReferUnity deviceUniqueIdentifier

Implementation

Future<String> winUniqueIdentifier() async {
  try {
    // fetch ids in windows
    final baseBoardID = await _winBaseBoardID();
    final biosID = await _winBiosID();
    final processorID = await _winProcessorID();
    final diskDriveID = await _winDiskDrive();
    final osNumber = await _winOSNumber();
    // Only stable hardware ids are hashed — never wall-clock time, or the
    // identifier would change on every call.
    return buildWinUniqueId(
      [baseBoardID, biosID, processorID, diskDriveID, osNumber],
    );
  } catch (e) {
    logger.e('uniqueIdentifier$e');
    return '';
  }
}