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

Unified Diff: crypto/ec_private_key.h

Issue 1539353003: Switch to standard integer types in crypto/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « crypto/curve25519_unittest.cc ('k') | crypto/ec_private_key_nss.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/ec_private_key.h
diff --git a/crypto/ec_private_key.h b/crypto/ec_private_key.h
index a3ba49d3fb05fe43a7baceb20e5e856e463673ce..9a8a02acfb5e15a5fc1727fde8d84b6d0e301091 100644
--- a/crypto/ec_private_key.h
+++ b/crypto/ec_private_key.h
@@ -5,10 +5,13 @@
#ifndef CRYPTO_EC_PRIVATE_KEY_H_
#define CRYPTO_EC_PRIVATE_KEY_H_
+#include <stddef.h>
+#include <stdint.h>
+
#include <string>
#include <vector>
-#include "base/basictypes.h"
+#include "base/macros.h"
#include "build/build_config.h"
#include "crypto/crypto_export.h"
@@ -45,8 +48,8 @@ class CRYPTO_EXPORT ECPrivateKey {
// Returns NULL if initialization fails.
static ECPrivateKey* CreateFromEncryptedPrivateKeyInfo(
const std::string& password,
- const std::vector<uint8>& encrypted_private_key_info,
- const std::vector<uint8>& subject_public_key_info);
+ const std::vector<uint8_t>& encrypted_private_key_info,
+ const std::vector<uint8_t>& subject_public_key_info);
#if !defined(USE_OPENSSL)
// Imports the key pair into |slot| and returns in |public_key| and |key|.
@@ -56,7 +59,7 @@ class CRYPTO_EXPORT ECPrivateKey {
static bool ImportFromEncryptedPrivateKeyInfo(
PK11SlotInfo* slot,
const std::string& password,
- const uint8* encrypted_private_key_info,
+ const uint8_t* encrypted_private_key_info,
size_t encrypted_private_key_info_len,
CERTSubjectPublicKeyInfo* decoded_spki,
bool permanent,
@@ -82,18 +85,18 @@ class CRYPTO_EXPORT ECPrivateKey {
// of 1000 iterations, on modern systems a larger value may be preferrable.
bool ExportEncryptedPrivateKey(const std::string& password,
int iterations,
- std::vector<uint8>* output);
+ std::vector<uint8_t>* output);
// Exports the public key to an X.509 SubjectPublicKeyInfo block.
- bool ExportPublicKey(std::vector<uint8>* output);
+ bool ExportPublicKey(std::vector<uint8_t>* output);
// Exports the public key as an EC point in the uncompressed point format.
bool ExportRawPublicKey(std::string* output);
// Exports private key data for testing. The format of data stored into output
// doesn't matter other than that it is consistent for the same key.
- bool ExportValue(std::vector<uint8>* output);
- bool ExportECParams(std::vector<uint8>* output);
+ bool ExportValue(std::vector<uint8_t>* output);
+ bool ExportECParams(std::vector<uint8_t>* output);
private:
// Constructor is private. Use one of the Create*() methods above instead.
« no previous file with comments | « crypto/curve25519_unittest.cc ('k') | crypto/ec_private_key_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698