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

Side by Side Diff: components/os_crypt/os_crypt_posix.cc

Issue 1551433002: Switch to standard integer types in components/, part 3 of 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more 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
« no previous file with comments | « components/os_crypt/os_crypt_mac.mm ('k') | components/os_crypt/os_crypt_switches.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "components/os_crypt/os_crypt.h" 5 #include "components/os_crypt/os_crypt.h"
6 6
7 #include <stddef.h>
8
7 #include "base/logging.h" 9 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
9 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
10 #include "crypto/encryptor.h" 12 #include "crypto/encryptor.h"
11 #include "crypto/symmetric_key.h" 13 #include "crypto/symmetric_key.h"
12 14
13 namespace { 15 namespace {
14 16
15 // Salt for Symmetric key derivation. 17 // Salt for Symmetric key derivation.
16 const char kSalt[] = "saltysalt"; 18 const char kSalt[] = "saltysalt";
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 std::string iv(kIVBlockSizeAES128, ' '); 132 std::string iv(kIVBlockSizeAES128, ' ');
131 crypto::Encryptor encryptor; 133 crypto::Encryptor encryptor;
132 if (!encryptor.Init(encryption_key.get(), crypto::Encryptor::CBC, iv)) 134 if (!encryptor.Init(encryption_key.get(), crypto::Encryptor::CBC, iv))
133 return false; 135 return false;
134 136
135 if (!encryptor.Decrypt(raw_ciphertext, plaintext)) 137 if (!encryptor.Decrypt(raw_ciphertext, plaintext))
136 return false; 138 return false;
137 139
138 return true; 140 return true;
139 } 141 }
OLDNEW
« no previous file with comments | « components/os_crypt/os_crypt_mac.mm ('k') | components/os_crypt/os_crypt_switches.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698