| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |