Fix mouse warp with 2x displays
[chromium-blink-merge.git] / remoting / host / pin_hash.h
blob033ac4a4cc1d720dd643ba45a40654b7603c596c
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 REMOTING_HOST_PIN_HASH_H_
6 #define REMOTING_HOST_PIN_HASH_H_
8 #include <string>
10 namespace remoting {
12 // Creates a Me2Me shared-secret hash, consisting of the hash method, and the
13 // hashed host ID and PIN.
14 std::string MakeHostPinHash(const std::string& host_id, const std::string& pin);
16 // Extracts the hash function from the given hash, uses it to calculate the
17 // hash of the given host ID and PIN, and compares that hash to the given hash.
18 // Returns true if the calculated and given hashes are equal.
19 bool VerifyHostPinHash(const std::string& hash,
20 const std::string& host_id,
21 const std::string& pin);
23 } // namespace remoting
25 #endif // REMOTING_HOST_PIN_HASH_