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

Unified Diff: crypto/encryptor_nss.cc

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/encryptor.cc ('k') | crypto/encryptor_openssl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/encryptor_nss.cc
diff --git a/crypto/encryptor_nss.cc b/crypto/encryptor_nss.cc
index ca5d5239a2a966c19e1f164ec5db065078672474..eca1377cb6969f5442c55eeb5de049668e7c3f22 100644
--- a/crypto/encryptor_nss.cc
+++ b/crypto/encryptor_nss.cc
@@ -5,6 +5,8 @@
#include "crypto/encryptor.h"
#include <cryptohi.h>
+#include <stddef.h>
+#include <stdint.h>
#include <vector>
#include "base/logging.h"
@@ -116,12 +118,12 @@ bool Encryptor::Crypt(PK11Context* context,
CHECK_GT(output_len, input.size());
output->resize(output_len);
- uint8* output_data =
- reinterpret_cast<uint8*>(const_cast<char*>(output->data()));
+ uint8_t* output_data =
+ reinterpret_cast<uint8_t*>(const_cast<char*>(output->data()));
int input_len = input.size();
- uint8* input_data =
- reinterpret_cast<uint8*>(const_cast<char*>(input.data()));
+ uint8_t* input_data =
+ reinterpret_cast<uint8_t*>(const_cast<char*>(input.data()));
int op_len;
SECStatus rv = PK11_CipherOp(context,
@@ -162,8 +164,8 @@ bool Encryptor::CryptCTR(PK11Context* context,
AES_BLOCK_SIZE;
CHECK_GE(output_len, input.size());
output->resize(output_len);
- uint8* output_data =
- reinterpret_cast<uint8*>(const_cast<char*>(output->data()));
+ uint8_t* output_data =
+ reinterpret_cast<uint8_t*>(const_cast<char*>(output->data()));
size_t mask_len;
bool ret = GenerateCounterMask(input.size(), output_data, &mask_len);
@@ -192,9 +194,8 @@ bool Encryptor::CryptCTR(PK11Context* context,
CHECK(!digest_len);
// Use |output_data| to mask |input|.
- MaskMessage(
- reinterpret_cast<uint8*>(const_cast<char*>(input.data())),
- input.length(), output_data, output_data);
+ MaskMessage(reinterpret_cast<uint8_t*>(const_cast<char*>(input.data())),
+ input.length(), output_data, output_data);
output->resize(input.length());
return true;
}
« no previous file with comments | « crypto/encryptor.cc ('k') | crypto/encryptor_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698