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

Side by Side Diff: chrome/common/extensions/api/networking_private/networking_private_crypto.h

Issue 396463004: Implement NetworkingPrivateCrypto for OpenSSL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
OLDNEW
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
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;
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698