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

Side by Side Diff: components/webcrypto/status.h

Issue 2837383002: Raise an error when calling WebCrypto's deriveBits() for HKDF with (Closed)
Patch Set: checkpoint Created 3 years, 8 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/webcrypto/algorithms/hkdf.cc ('k') | components/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 COMPONENTS_WEBCRYPTO_STATUS_H_ 5 #ifndef COMPONENTS_WEBCRYPTO_STATUS_H_
6 #define COMPONENTS_WEBCRYPTO_STATUS_H_ 6 #define COMPONENTS_WEBCRYPTO_STATUS_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 // The public and private keys given to ECDH key derivation were not for the 251 // The public and private keys given to ECDH key derivation were not for the
252 // same named curve. 252 // same named curve.
253 static Status ErrorEcdhCurveMismatch(); 253 static Status ErrorEcdhCurveMismatch();
254 254
255 // The requested bit length for ECDH key derivation was too large. 255 // The requested bit length for ECDH key derivation was too large.
256 static Status ErrorEcdhLengthTooBig(unsigned int max_length_bits); 256 static Status ErrorEcdhLengthTooBig(unsigned int max_length_bits);
257 257
258 // The requested length for HKDF was too large. 258 // The requested length for HKDF was too large.
259 static Status ErrorHkdfLengthTooLong(); 259 static Status ErrorHkdfLengthTooLong();
260 260
261 // The length to HKDF's deriveBits() was not a multiple of 8.
262 static Status ErrorHkdfLengthNotWholeByte();
263
261 // No length parameter was provided for HKDF's Derive Bits operation. 264 // No length parameter was provided for HKDF's Derive Bits operation.
262 static Status ErrorHkdfDeriveBitsLengthNotSpecified(); 265 static Status ErrorHkdfDeriveBitsLengthNotSpecified();
263 266
264 // The requested bit length for PBKDF2 key derivation was invalid. 267 // The requested bit length for PBKDF2 key derivation was invalid.
265 static Status ErrorPbkdf2InvalidLength(); 268 static Status ErrorPbkdf2InvalidLength();
266 269
267 // No length parameter was provided for PBKDF2's Derive Bits operation. 270 // No length parameter was provided for PBKDF2's Derive Bits operation.
268 static Status ErrorPbkdf2DeriveBitsLengthNotSpecified(); 271 static Status ErrorPbkdf2DeriveBitsLengthNotSpecified();
269 272
270 // PBKDF2's deriveBits() was called with an unsupported length of 0. 273 // PBKDF2's deriveBits() was called with an unsupported length of 0.
(...skipping 17 matching lines...) Expand all
288 explicit Status(Type type); 291 explicit Status(Type type);
289 292
290 Type type_; 293 Type type_;
291 blink::WebCryptoErrorType error_type_; 294 blink::WebCryptoErrorType error_type_;
292 std::string error_details_; 295 std::string error_details_;
293 }; 296 };
294 297
295 } // namespace webcrypto 298 } // namespace webcrypto
296 299
297 #endif // COMPONENTS_WEBCRYPTO_STATUS_H_ 300 #endif // COMPONENTS_WEBCRYPTO_STATUS_H_
OLDNEW
« no previous file with comments | « components/webcrypto/algorithms/hkdf.cc ('k') | components/webcrypto/status.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698