| 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 <string> | 8 #include <string> |
| 9 #include "third_party/WebKit/public/platform/WebCrypto.h" | 9 #include "third_party/WebKit/public/platform/WebCrypto.h" |
| 10 | 10 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 // The key data buffer provided for importKey() is an incorrect length for | 127 // The key data buffer provided for importKey() is an incorrect length for |
| 128 // AES. | 128 // AES. |
| 129 static Status ErrorImportAesKeyLength(); | 129 static Status ErrorImportAesKeyLength(); |
| 130 | 130 |
| 131 // The length specified when deriving an AES key was not 128 or 256 bits. | 131 // The length specified when deriving an AES key was not 128 or 256 bits. |
| 132 static Status ErrorGetAesKeyLength(); | 132 static Status ErrorGetAesKeyLength(); |
| 133 | 133 |
| 134 // Attempted to generate an AES key with an invalid length. | 134 // Attempted to generate an AES key with an invalid length. |
| 135 static Status ErrorGenerateAesKeyLength(); | 135 static Status ErrorGenerateAesKeyLength(); |
| 136 | 136 |
| 137 // 192-bit AES keys are valid, however unsupported. | 137 // 192-bit AES keys are valid, however unsupported (http://crbug.com/533699) |
| 138 static Status ErrorAes192BitUnsupported(); | 138 static Status ErrorAes192BitUnsupported(); |
| 139 | 139 |
| 140 // The wrong key was used for the operation. For instance, a public key was | 140 // The wrong key was used for the operation. For instance, a public key was |
| 141 // used to verify a RsaSsaPkcs1v1_5 signature, or tried exporting a private | 141 // used to verify a RsaSsaPkcs1v1_5 signature, or tried exporting a private |
| 142 // key using spki format. | 142 // key using spki format. |
| 143 static Status ErrorUnexpectedKeyType(); | 143 static Status ErrorUnexpectedKeyType(); |
| 144 | 144 |
| 145 // When doing an AES-CBC encryption/decryption, the "iv" parameter was not 16 | 145 // When doing an AES-CBC encryption/decryption, the "iv" parameter was not 16 |
| 146 // bytes. | 146 // bytes. |
| 147 static Status ErrorIncorrectSizeAesCbcIv(); | 147 static Status ErrorIncorrectSizeAesCbcIv(); |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 explicit Status(Type type); | 276 explicit Status(Type type); |
| 277 | 277 |
| 278 Type type_; | 278 Type type_; |
| 279 blink::WebCryptoErrorType error_type_; | 279 blink::WebCryptoErrorType error_type_; |
| 280 std::string error_details_; | 280 std::string error_details_; |
| 281 }; | 281 }; |
| 282 | 282 |
| 283 } // namespace webcrypto | 283 } // namespace webcrypto |
| 284 | 284 |
| 285 #endif // COMPONENTS_WEBCRYPTO_STATUS_H_ | 285 #endif // COMPONENTS_WEBCRYPTO_STATUS_H_ |
| OLD | NEW |