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

Side by Side Diff: credentials.h

Issue 2645008: Update on feedback, update dbus API, add unit tests. TEST=manual,unit,BVT BUG=3628 323 (Closed) Base URL: ssh://git@chromiumos-git/cryptohome.git
Patch Set: Address second round of feedback. Created 10 years, 6 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 | « SConstruct ('k') | crypto.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009-2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2009-2010 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Credentials is the interface for objects that wrap up a set 5 // Credentials is the interface for objects that wrap up a set
6 // of credentials with which we can authenticate or mount. 6 // of credentials with which we can authenticate or mount.
7 7
8 #ifndef CRYPTOHOME_CREDENTIALS_H_ 8 #ifndef CRYPTOHOME_CREDENTIALS_H_
9 #define CRYPTOHOME_CREDENTIALS_H_ 9 #define CRYPTOHOME_CREDENTIALS_H_
10 10
11 #include "cryptohome/secure_blob.h" 11 #include "secure_blob.h"
12 12
13 namespace cryptohome { 13 namespace cryptohome {
14 14
15 class Credentials { 15 class Credentials {
16 public: 16 public:
17 Credentials() {} 17 Credentials() {}
18 virtual ~Credentials() {} 18 virtual ~Credentials() {}
19 19
20 // Returns the full user name, including any '@' sign or domain name. 20 // Returns the full user name, including any '@' sign or domain name.
21 // 21 //
22 // Parameters 22 // Parameters
23 // name_buffer - Output buffer. 23 // name_buffer - Output buffer.
24 // length - Amount of space in name_buffer 24 // length - Amount of space in name_buffer
25 // 25 //
26 virtual void GetFullUsername(char *name_buffer, int length) const = 0; 26 virtual void GetFullUsername(char *name_buffer, int length) const = 0;
27 27
28 // Returns the full user name as a std::string 28 // Returns the full user name as a std::string
29 virtual std::string GetFullUsername() const = 0; 29 //
30 // Parameters
31 //
32 virtual std::string GetFullUsernameString() const = 0;
30 33
31 // Returns the part of the username before the '@' 34 // Returns the part of the username before the '@'
32 // 35 //
33 // Parameters 36 // Parameters
34 // name_buffer - Output buffer. 37 // name_buffer - Output buffer.
35 // length - Amount of space in name_buffer 38 // length - Amount of space in name_buffer
36 // 39 //
37 virtual void GetPartialUsername(char *name_buffer, int length) const = 0; 40 virtual void GetPartialUsername(char *name_buffer, int length) const = 0;
38 41
39 // Returns the obfuscated username, used as the name of the directory 42 // Returns the obfuscated username, used as the name of the directory
40 // containing the user's stateful data (and maybe used for other reasons 43 // containing the user's stateful data (and maybe used for other reasons
41 // at some point.) 44 // at some point.)
42 virtual std::string GetObfuscatedUsername( 45 virtual std::string GetObfuscatedUsername(
43 const chromeos::Blob &system_salt) const = 0; 46 const chromeos::Blob &system_salt) const = 0;
44 47
45 // Returns a the user's passkey 48 // Returns a the user's passkey
46 // 49 //
47 // Returns 50 // Parameters
48 // A SecureBlob containing the passkey 51 // passkey - A SecureBlob containing the passkey
49 // 52 //
50 virtual SecureBlob GetPasskey() const = 0; 53 virtual void GetPasskey(SecureBlob* passkey) const = 0;
51 }; 54 };
52 55
53 } // namespace cryptohome 56 } // namespace cryptohome
54 57
55 #endif // CRYPTOHOME_CREDENTIALS_H_ 58 #endif // CRYPTOHOME_CREDENTIALS_H_
OLDNEW
« no previous file with comments | « SConstruct ('k') | crypto.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698