OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2011 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_PROTOCOL_AUTH_UTIL_H_ | |
6 #define REMOTING_PROTOCOL_AUTH_UTIL_H_ | |
Wez
2011/11/22 22:29:48
This code defines constants and functions for the
Sergey Ulanov
2011/11/23 01:23:42
Some of the code defined in this file will still b
| |
7 | |
8 #include <string> | |
9 | |
10 namespace remoting { | |
11 namespace protocol { | |
12 | |
13 // Labels for use when exporting the SSL master keys. | |
14 extern const char kClientAuthSslExporterLabel[]; | |
15 | |
16 // Fake hostname used for SSL connections. | |
17 extern const char kSslFakeHostName[]; | |
18 | |
19 // Size of the HMAC-SHA-256 authentication digest. | |
20 const size_t kAuthDigestLength = 32; | |
21 | |
22 // Generates auth token for the specified |jid| and |access_code|. | |
23 std::string GenerateSupportAuthToken(const std::string& jid, | |
24 const std::string& access_code); | |
25 | |
26 // Verifies validity of an |access_token|. | |
27 bool VerifySupportAuthToken(const std::string& jid, | |
28 const std::string& access_code, | |
29 const std::string& auth_token); | |
Wez
2011/11/22 22:29:48
Should these be base::StringPiece, not std::string
Sergey Ulanov
2011/11/23 01:23:42
Yes, but I just moving this code in this CL, so I'
| |
30 | |
31 // Returns hash used for channel authentication. | |
32 bool GetAuthBytes(const std::string& shared_secret, | |
33 const std::string& key_material, | |
34 std::string* auth_bytes); | |
35 | |
36 } // namespace protocol | |
37 } // namespace remoting | |
38 | |
39 #endif // REMOTING_PROTOCOL_AUTH_UTIL_H_ | |
OLD | NEW |