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

Side by Side Diff: content/child/webcrypto/status.h

Issue 889493002: Allow PBKDF2 key derivation using an empty password. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « content/child/webcrypto/openssl/pbkdf2_openssl.cc ('k') | content/child/webcrypto/status.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 #ifndef CONTENT_CHILD_WEBCRYPTO_STATUS_H_ 5 #ifndef CONTENT_CHILD_WEBCRYPTO_STATUS_H_
6 #define CONTENT_CHILD_WEBCRYPTO_STATUS_H_ 6 #define CONTENT_CHILD_WEBCRYPTO_STATUS_H_
7 7
8 #include <string> 8 #include <string>
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 #include "third_party/WebKit/public/platform/WebCrypto.h" 10 #include "third_party/WebKit/public/platform/WebCrypto.h"
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 261
262 // No length parameter was provided for HKDF's Derive Bits operation. 262 // No length parameter was provided for HKDF's Derive Bits operation.
263 static Status ErrorHkdfDeriveBitsLengthNotSpecified(); 263 static Status ErrorHkdfDeriveBitsLengthNotSpecified();
264 264
265 // The requested bit length for PBKDF2 key derivation was invalid. 265 // The requested bit length for PBKDF2 key derivation was invalid.
266 static Status ErrorPbkdf2InvalidLength(); 266 static Status ErrorPbkdf2InvalidLength();
267 267
268 // No length parameter was provided for PBKDF2's Derive Bits operation. 268 // No length parameter was provided for PBKDF2's Derive Bits operation.
269 static Status ErrorPbkdf2DeriveBitsLengthNotSpecified(); 269 static Status ErrorPbkdf2DeriveBitsLengthNotSpecified();
270 270
271 // An empty password was provided for PBKDF2
272 static Status ErrorPbkdf2EmptyPassword();
273
274 private: 271 private:
275 enum Type { TYPE_ERROR, TYPE_SUCCESS }; 272 enum Type { TYPE_ERROR, TYPE_SUCCESS };
276 273
277 // Constructs an error with the specified error type and message. 274 // Constructs an error with the specified error type and message.
278 Status(blink::WebCryptoErrorType error_type, 275 Status(blink::WebCryptoErrorType error_type,
279 const std::string& error_details_utf8); 276 const std::string& error_details_utf8);
280 277
281 // Constructs a success or error without any details. 278 // Constructs a success or error without any details.
282 explicit Status(Type type); 279 explicit Status(Type type);
283 280
284 Type type_; 281 Type type_;
285 blink::WebCryptoErrorType error_type_; 282 blink::WebCryptoErrorType error_type_;
286 std::string error_details_; 283 std::string error_details_;
287 }; 284 };
288 285
289 } // namespace webcrypto 286 } // namespace webcrypto
290 287
291 } // namespace content 288 } // namespace content
292 289
293 #endif // CONTENT_CHILD_WEBCRYPTO_STATUS_H_ 290 #endif // CONTENT_CHILD_WEBCRYPTO_STATUS_H_
OLDNEW
« no previous file with comments | « content/child/webcrypto/openssl/pbkdf2_openssl.cc ('k') | content/child/webcrypto/status.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698