| 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 namespace content { | 7 namespace content { |
| 8 | 8 |
| 9 namespace webcrypto { | 9 namespace webcrypto { |
| 10 | 10 |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 | 188 |
| 189 Status Status::ErrorImportRsaEmptyModulus() { | 189 Status Status::ErrorImportRsaEmptyModulus() { |
| 190 return Status(blink::WebCryptoErrorTypeData, "The modulus is empty"); | 190 return Status(blink::WebCryptoErrorTypeData, "The modulus is empty"); |
| 191 } | 191 } |
| 192 | 192 |
| 193 Status Status::ErrorGenerateRsaZeroModulus() { | 193 Status Status::ErrorGenerateRsaZeroModulus() { |
| 194 return Status(blink::WebCryptoErrorTypeData, | 194 return Status(blink::WebCryptoErrorTypeData, |
| 195 "The modulus bit length cannot be zero"); | 195 "The modulus bit length cannot be zero"); |
| 196 } | 196 } |
| 197 | 197 |
| 198 Status Status::ErrorGenerateRsaUnsupportedModulus() { |
| 199 return Status(blink::WebCryptoErrorTypeNotSupported, |
| 200 "The modulus length must be a multiple of 8 bits and >= 256 " |
| 201 "and <= 16384"); |
| 202 } |
| 203 |
| 198 Status Status::ErrorImportRsaEmptyExponent() { | 204 Status Status::ErrorImportRsaEmptyExponent() { |
| 199 return Status(blink::WebCryptoErrorTypeData, | 205 return Status(blink::WebCryptoErrorTypeData, |
| 200 "No bytes for the exponent were provided"); | 206 "No bytes for the exponent were provided"); |
| 201 } | 207 } |
| 202 | 208 |
| 203 Status Status::ErrorKeyNotExtractable() { | 209 Status Status::ErrorKeyNotExtractable() { |
| 204 return Status(blink::WebCryptoErrorTypeInvalidAccess, | 210 return Status(blink::WebCryptoErrorTypeInvalidAccess, |
| 205 "They key is not extractable"); | 211 "They key is not extractable"); |
| 206 } | 212 } |
| 207 | 213 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 222 error_type_(error_type), | 228 error_type_(error_type), |
| 223 error_details_(error_details_utf8) { | 229 error_details_(error_details_utf8) { |
| 224 } | 230 } |
| 225 | 231 |
| 226 Status::Status(Type type) : type_(type) { | 232 Status::Status(Type type) : type_(type) { |
| 227 } | 233 } |
| 228 | 234 |
| 229 } // namespace webcrypto | 235 } // namespace webcrypto |
| 230 | 236 |
| 231 } // namespace content | 237 } // namespace content |
| OLD | NEW |