| 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 Status Status::ErrorUnsupported() { | 148 Status Status::ErrorUnsupported() { |
| 149 return Status(blink::WebCryptoErrorTypeNotSupported, | 149 return Status(blink::WebCryptoErrorTypeNotSupported, |
| 150 "The requested operation is unsupported"); | 150 "The requested operation is unsupported"); |
| 151 } | 151 } |
| 152 | 152 |
| 153 Status Status::ErrorUnexpected() { | 153 Status Status::ErrorUnexpected() { |
| 154 return Status(blink::WebCryptoErrorTypeUnknown, | 154 return Status(blink::WebCryptoErrorTypeUnknown, |
| 155 "Something unexpected happened..."); | 155 "Something unexpected happened..."); |
| 156 } | 156 } |
| 157 | 157 |
| 158 Status Status::ErrorAesGcm192Unsupported() { |
| 159 return Status(blink::WebCryptoErrorTypeNotSupported, |
| 160 "AES-GCM using 192-bit keys is not supported"); |
| 161 } |
| 162 |
| 158 Status Status::ErrorInvalidAesGcmTagLength() { | 163 Status Status::ErrorInvalidAesGcmTagLength() { |
| 159 return Status( | 164 return Status( |
| 160 blink::WebCryptoErrorTypeData, | 165 blink::WebCryptoErrorTypeData, |
| 161 "The tag length is invalid: Must be 32, 64, 96, 104, 112, 120, or 128 " | 166 "The tag length is invalid: Must be 32, 64, 96, 104, 112, 120, or 128 " |
| 162 "bits"); | 167 "bits"); |
| 163 } | 168 } |
| 164 | 169 |
| 165 Status Status::ErrorInvalidAesKwDataLength() { | 170 Status Status::ErrorInvalidAesKwDataLength() { |
| 166 return Status(blink::WebCryptoErrorTypeData, | 171 return Status(blink::WebCryptoErrorTypeData, |
| 167 "The AES-KW input data length is invalid: not a multiple of 8 " | 172 "The AES-KW input data length is invalid: not a multiple of 8 " |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 error_type_(error_type), | 214 error_type_(error_type), |
| 210 error_details_(error_details_utf8) { | 215 error_details_(error_details_utf8) { |
| 211 } | 216 } |
| 212 | 217 |
| 213 Status::Status(Type type) : type_(type) { | 218 Status::Status(Type type) : type_(type) { |
| 214 } | 219 } |
| 215 | 220 |
| 216 } // namespace webcrypto | 221 } // namespace webcrypto |
| 217 | 222 |
| 218 } // namespace content | 223 } // namespace content |
| OLD | NEW |