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_
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_