Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(272)

Side by Side Diff: remoting/protocol/authentication_method.h

Issue 1768383004: Cleanup AuthenticatorMethod usage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « remoting/protocol/auth_util.cc ('k') | remoting/protocol/authentication_method.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 #ifndef REMOTING_PROTOCOL_AUTHENTICATION_METHOD_H_
5 #define REMOTING_PROTOCOL_AUTHENTICATION_METHOD_H_
6
7 #include <string>
8
9 namespace remoting {
10 namespace protocol {
11
12 class Authenticator;
13
14 // AuthenticationMethod represents an authentication algorithm.
15 enum class AuthenticationMethod {
16 INVALID,
17 SPAKE2_SHARED_SECRET_PLAIN,
18 SPAKE2_SHARED_SECRET_HMAC,
19 SPAKE2_PAIR,
20 THIRD_PARTY
21 };
22
23 enum class HashFunction {
24 NONE,
25 HMAC_SHA256,
26 };
27
28 // Parses a string that defines an authentication method. Returns
29 // AuthenticationMethod::INVALID if the string is invalid.
30 AuthenticationMethod ParseAuthenticationMethodString(const std::string& value);
31
32 // Returns string representation of |method|.
33 const std::string AuthenticationMethodToString(AuthenticationMethod method);
34
35 // Returns hash function applied to the shared secret on both ends for the
36 // spefied |method|.
37 HashFunction GetHashFunctionForAuthenticationMethod(
38 AuthenticationMethod method);
39
40 // Applies the specified hash function to |shared_secret| with the
41 // specified |tag| as a key.
42 std::string ApplySharedSecretHashFunction(HashFunction hash_function,
43 const std::string& tag,
44 const std::string& shared_secret);
45
46 } // namespace protocol
47 } // namespace remoting
48
49 #endif // REMOTING_PROTOCOL_AUTHENTICATION_METHOD_H_
OLDNEW
« no previous file with comments | « remoting/protocol/auth_util.cc ('k') | remoting/protocol/authentication_method.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698