1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef RLZ_LIB_MACHINE_ID_H_
6 #define RLZ_LIB_MACHINE_ID_H_
8 #include "base/strings/string16.h"
14 // Gets the unique ID for the machine used for RLZ tracking purposes. On
15 // Windows, this ID is derived from the Windows machine SID, and is the string
16 // representation of a 20 byte hash + 4 bytes volum id + a 1 byte checksum.
17 // Included in financial pings with events, unless explicitly forbidden by the
18 // calling application.
19 bool GetMachineId(std::string
* machine_id
);
21 // Retrieves a raw machine identifier string and a machine-specific
22 // 4 byte value. GetMachineId() will SHA1 |data|, append |more_data|, compute
23 // the Crc8 of that, and return a hex-encoded string of that data.
24 bool GetRawMachineId(base::string16
* data
, int* more_data
);
27 bool GetMachineIdImpl(const base::string16
& sid_string
,
29 std::string
* machine_id
);
30 } // namespace testing
32 } // namespace rlz_lib
34 #endif // RLZ_LIB_MACHINE_ID_H_