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

Side by Side Diff: crypto/encryptor_nss.cc

Issue 36593002: crypto/nss_util: Get TPM slot id, do lookup by id instead of by name. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sandbox debugging crap Created 7 years, 1 month 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "crypto/encryptor.h" 5 #include "crypto/encryptor.h"
6 6
7 #include <cryptohi.h> 7 #include <cryptohi.h>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 17 matching lines...) Expand all
28 break; 28 break;
29 } 29 }
30 return static_cast<CK_MECHANISM_TYPE>(-1); 30 return static_cast<CK_MECHANISM_TYPE>(-1);
31 } 31 }
32 32
33 } // namespace 33 } // namespace
34 34
35 Encryptor::Encryptor() 35 Encryptor::Encryptor()
36 : key_(NULL), 36 : key_(NULL),
37 mode_(CBC) { 37 mode_(CBC) {
38 LOG(ERROR) << "HIIIIIIIIIIIIIIIIIIIIIIIIIII";
38 EnsureNSSInit(); 39 EnsureNSSInit();
39 } 40 }
40 41
41 Encryptor::~Encryptor() { 42 Encryptor::~Encryptor() {
42 } 43 }
43 44
44 bool Encryptor::Init(SymmetricKey* key, 45 bool Encryptor::Init(SymmetricKey* key,
45 Mode mode, 46 Mode mode,
46 const base::StringPiece& iv) { 47 const base::StringPiece& iv) {
47 DCHECK(key); 48 DCHECK(key);
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 194
194 // Use |output_data| to mask |input|. 195 // Use |output_data| to mask |input|.
195 MaskMessage( 196 MaskMessage(
196 reinterpret_cast<uint8*>(const_cast<char*>(input.data())), 197 reinterpret_cast<uint8*>(const_cast<char*>(input.data())),
197 input.length(), output_data, output_data); 198 input.length(), output_data, output_data);
198 output->resize(input.length()); 199 output->resize(input.length());
199 return true; 200 return true;
200 } 201 }
201 202
202 } // namespace crypto 203 } // namespace crypto
OLDNEW
« no previous file with comments | « crypto/ec_signature_creator_nss.cc ('k') | crypto/hmac_nss.cc » ('j') | crypto/nss_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698