| 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 #include "content/child/webcrypto/status.h" | 5 #include "content/child/webcrypto/status.h" |
| 6 | 6 |
| 7 #include "base/format_macros.h" | 7 #include "base/format_macros.h" |
| 8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 "bits"); | 211 "bits"); |
| 212 } | 212 } |
| 213 | 213 |
| 214 Status Status::ErrorInvalidAesKwDataLength() { | 214 Status Status::ErrorInvalidAesKwDataLength() { |
| 215 return Status(blink::WebCryptoErrorTypeData, | 215 return Status(blink::WebCryptoErrorTypeData, |
| 216 "The AES-KW input data length is invalid: not a multiple of 8 " | 216 "The AES-KW input data length is invalid: not a multiple of 8 " |
| 217 "bytes"); | 217 "bytes"); |
| 218 } | 218 } |
| 219 | 219 |
| 220 Status Status::ErrorGenerateKeyPublicExponent() { | 220 Status Status::ErrorGenerateKeyPublicExponent() { |
| 221 return Status(blink::WebCryptoErrorTypeData, | 221 return Status(blink::WebCryptoErrorTypeOperation, |
| 222 "The \"publicExponent\" must be either 3 or 65537"); | 222 "The \"publicExponent\" must be either 3 or 65537"); |
| 223 } | 223 } |
| 224 | 224 |
| 225 Status Status::ErrorImportRsaEmptyModulus() { | 225 Status Status::ErrorImportRsaEmptyModulus() { |
| 226 return Status(blink::WebCryptoErrorTypeData, "The modulus is empty"); | 226 return Status(blink::WebCryptoErrorTypeData, "The modulus is empty"); |
| 227 } | 227 } |
| 228 | 228 |
| 229 Status Status::ErrorGenerateRsaUnsupportedModulus() { | 229 Status Status::ErrorGenerateRsaUnsupportedModulus() { |
| 230 return Status(blink::WebCryptoErrorTypeNotSupported, | 230 return Status(blink::WebCryptoErrorTypeNotSupported, |
| 231 "The modulus length must be a multiple of 8 bits and >= 256 " | 231 "The modulus length must be a multiple of 8 bits and >= 256 " |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 error_type_(error_type), | 329 error_type_(error_type), |
| 330 error_details_(error_details_utf8) { | 330 error_details_(error_details_utf8) { |
| 331 } | 331 } |
| 332 | 332 |
| 333 Status::Status(Type type) : type_(type) { | 333 Status::Status(Type type) : type_(type) { |
| 334 } | 334 } |
| 335 | 335 |
| 336 } // namespace webcrypto | 336 } // namespace webcrypto |
| 337 | 337 |
| 338 } // namespace content | 338 } // namespace content |
| OLD | NEW |