OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium 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 #include "chrome/browser/chromeos/platform_keys/platform_keys.h" | 5 #include "chrome/browser/chromeos/platform_keys/platform_keys.h" |
6 | 6 |
7 namespace chromeos { | 7 namespace chromeos { |
8 | 8 |
9 namespace platform_keys { | 9 namespace platform_keys { |
10 | 10 |
11 const char kTokenIdUser[] = "user"; | 11 const char kTokenIdUser[] = "user"; |
12 const char kTokenIdSystem[] = "system"; | 12 const char kTokenIdSystem[] = "system"; |
13 | 13 |
| 14 // static |
| 15 scoped_ptr<SignRSAParams> SignRSAParams::CreateSignParamsWithHashing( |
| 16 const std::string data, |
| 17 const std::string public_key, |
| 18 HashAlgorithm hash_algorithm) { |
| 19 return make_scoped_ptr(new SignRSAParams( |
| 20 data, public_key, false /* sign with hash function */, hash_algorithm)); |
| 21 } |
| 22 |
| 23 // static |
| 24 scoped_ptr<SignRSAParams> SignRSAParams::CreateDirectSignParams( |
| 25 const std::string data, |
| 26 const std::string public_key) { |
| 27 return make_scoped_ptr(new SignRSAParams( |
| 28 data, public_key, true /* direct signing without hash function */, |
| 29 HASH_ALGORITHM_NONE)); |
| 30 } |
| 31 |
| 32 SignRSAParams::SignRSAParams(const std::string& data, |
| 33 const std::string& public_key, |
| 34 bool sign_direct_pkcs_padded, |
| 35 HashAlgorithm hash_algorithm) |
| 36 : data_(data), |
| 37 public_key_(public_key), |
| 38 sign_direct_pkcs_padded_(sign_direct_pkcs_padded), |
| 39 hash_algorithm_(hash_algorithm) { |
| 40 } |
| 41 |
| 42 SignRSAParams::~SignRSAParams() { |
| 43 } |
| 44 |
14 ClientCertificateRequest::ClientCertificateRequest() { | 45 ClientCertificateRequest::ClientCertificateRequest() { |
15 } | 46 } |
16 | 47 |
17 ClientCertificateRequest::~ClientCertificateRequest() { | 48 ClientCertificateRequest::~ClientCertificateRequest() { |
18 } | 49 } |
19 | 50 |
| 51 GetPublicKeyResult::GetPublicKeyResult() { |
| 52 } |
| 53 |
| 54 GetPublicKeyResult::~GetPublicKeyResult() { |
| 55 } |
| 56 |
20 } // namespace platform_keys | 57 } // namespace platform_keys |
21 | 58 |
22 } // namespace chromeos | 59 } // namespace chromeos |
OLD | NEW |