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

Side by Side Diff: remoting/host/host_key_pair.h

Issue 3087003: Added HostKeyPair class, signatures for heartbeat messages. (Closed)
Patch Set: - Created 10 years, 4 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/host/heartbeat_sender_unittest.cc ('k') | remoting/host/host_key_pair.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) 2010 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_HOST_KEY_PAIR_H_
6 #define REMOTING_HOST_HOST_KEY_PAIR_H_
7
8 #include <string>
9
10 #include "base/ref_counted.h"
11 #include "base/scoped_ptr.h"
12 #include "base/task.h"
13
14 namespace base {
15 class RSAPrivateKey;
16 } // namespace base
17
18 namespace remoting {
19
20 class HostConfig;
21 class MutableHostConfig;
22
23 class HostKeyPair {
24 public:
25 HostKeyPair();
26 ~HostKeyPair();
27
28 void Generate();
29 bool LoadFromString(const std::string& key_base64);
30 bool Load(HostConfig* host_config);
31 void Save(MutableHostConfig* host_config);
32
33 std::string GetPublicKey() const;
34 std::string GetSignature(const std::string& message) const;
35
36 private:
37 void DoSave(MutableHostConfig* host_config) const;
38
39 scoped_ptr<base::RSAPrivateKey> key_;
40 };
41
42 } // namespace remoting
43
44 DISABLE_RUNNABLE_METHOD_REFCOUNT(remoting::HostKeyPair);
45
46 #endif // REMOTING_HOST_HOST_KEY_PAIR_H_
OLDNEW
« no previous file with comments | « remoting/host/heartbeat_sender_unittest.cc ('k') | remoting/host/host_key_pair.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698