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

Side by Side Diff: chrome/browser/devtools/device/usb/android_rsa.cc

Issue 1542413002: Switch to standard integer types in chrome/browser/, part 1 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
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 #include "chrome/browser/devtools/device/usb/android_rsa.h" 5 #include "chrome/browser/devtools/device/usb/android_rsa.h"
6 6
7 #include <stddef.h>
7 #include <stdint.h> 8 #include <stdint.h>
9 #include <string.h>
8 10
9 #include <limits> 11 #include <limits>
10 12
11 #include "base/base64.h" 13 #include "base/base64.h"
12 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
13 #include "chrome/browser/profiles/profile.h" 15 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/common/pref_names.h" 16 #include "chrome/common/pref_names.h"
15 #include "components/syncable_prefs/pref_service_syncable.h" 17 #include "components/syncable_prefs/pref_service_syncable.h"
16 #include "crypto/rsa_private_key.h" 18 #include "crypto/rsa_private_key.h"
17 #include "crypto/signature_creator.h" 19 #include "crypto/signature_creator.h"
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 std::string AndroidRSASign(crypto::RSAPrivateKey* key, 271 std::string AndroidRSASign(crypto::RSAPrivateKey* key,
270 const std::string& body) { 272 const std::string& body) {
271 std::vector<uint8_t> digest(body.begin(), body.end()); 273 std::vector<uint8_t> digest(body.begin(), body.end());
272 std::vector<uint8_t> result; 274 std::vector<uint8_t> result;
273 if (!crypto::SignatureCreator::Sign(key, crypto::SignatureCreator::SHA1, 275 if (!crypto::SignatureCreator::Sign(key, crypto::SignatureCreator::SHA1,
274 digest.data(), digest.size(), &result)) { 276 digest.data(), digest.size(), &result)) {
275 return std::string(); 277 return std::string();
276 } 278 }
277 return std::string(result.begin(), result.end()); 279 return std::string(result.begin(), result.end());
278 } 280 }
OLDNEW
« no previous file with comments | « chrome/browser/devtools/device/tcp_device_provider.h ('k') | chrome/browser/devtools/device/usb/android_usb_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698