Chromium Code Reviews| 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 #ifndef CHROME_COMMON_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_CRYPT O_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_CRYPT O_H_ |
| 6 #define CHROME_COMMON_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_CRYPT O_H_ | 6 #define CHROME_COMMON_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_CRYPT O_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 44 // Decrypt |encrypted_data| with |private_key_pem|. |private_key_pem| is the | 44 // Decrypt |encrypted_data| with |private_key_pem|. |private_key_pem| is the |
| 45 // PKCS8 PEM-encoded private key. |encrypted_data| is data encrypted with | 45 // PKCS8 PEM-encoded private key. |encrypted_data| is data encrypted with |
| 46 // EncryptByteString. Used in NetworkingPrivateCryptoTest::EncryptString test. | 46 // EncryptByteString. Used in NetworkingPrivateCryptoTest::EncryptString test. |
| 47 // | 47 // |
| 48 // Returns true on success, storing the decrypted result in | 48 // Returns true on success, storing the decrypted result in |
| 49 // |decrypted_output|. | 49 // |decrypted_output|. |
| 50 bool DecryptByteString(const std::string& private_key_pem, | 50 bool DecryptByteString(const std::string& private_key_pem, |
| 51 const std::vector<uint8>& encrypted_data, | 51 const std::vector<uint8>& encrypted_data, |
| 52 std::string* decrypted_output); | 52 std::string* decrypted_output); |
| 53 | 53 |
| 54 static const uint8 kTrustedCAPublicKeyDER[]; | |
| 55 static const size_t kTrustedCAPublicKeyDERLength; | |
|
Ryan Sleevi
2014/07/17 17:26:29
Document, if it's in a public header.
davidben
2014/07/17 22:08:22
Done.
| |
| 56 | |
| 54 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateCrypto); | 57 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateCrypto); |
| 55 }; | 58 }; |
| 56 | 59 |
| 57 #endif // CHROME_COMMON_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_CR YPTO_H_ | 60 #endif // CHROME_COMMON_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_CR YPTO_H_ |
| OLD | NEW |