OLD | NEW |
---|---|
(Empty) | |
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. | |
4 | |
5 #ifndef REMOTING_HOST_PIN_HASH_H_ | |
6 #define REMOTING_HOST_PIN_HASH_H_ | |
7 | |
8 #include <string> | |
9 | |
10 namespace remoting { | |
11 | |
12 // Hashes a host ID and a PIN. | |
13 // A Me2Me host uses this to hash a shared secret. | |
Wez
2012/05/01 01:02:36
nit: Suggest "Create a Me2Me shared-secret hash, c
simonmorris
2012/05/01 01:11:55
Done.
| |
14 std::string MakeHostPinHash(const std::string& host_id, const std::string& pin); | |
15 | |
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); | |
22 | |
23 } // namespace remoting | |
24 | |
25 #endif // REMOTING_HOST_PIN_HASH_ | |
OLD | NEW |