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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 Status Status::ErrorUnexpectedKeyType() { | 143 Status Status::ErrorUnexpectedKeyType() { |
144 return Status(blink::WebCryptoErrorTypeInvalidAccess, | 144 return Status(blink::WebCryptoErrorTypeInvalidAccess, |
145 "The key is not of the expected type"); | 145 "The key is not of the expected type"); |
146 } | 146 } |
147 | 147 |
148 Status Status::ErrorIncorrectSizeAesCbcIv() { | 148 Status Status::ErrorIncorrectSizeAesCbcIv() { |
149 return Status(blink::WebCryptoErrorTypeData, | 149 return Status(blink::WebCryptoErrorTypeData, |
150 "The \"iv\" has an unexpected length -- must be 16 bytes"); | 150 "The \"iv\" has an unexpected length -- must be 16 bytes"); |
151 } | 151 } |
152 | 152 |
| 153 Status Status::ErrorIncorrectSizeAesCtrCounter() { |
| 154 return Status(blink::WebCryptoErrorTypeData, |
| 155 "The \"counter\" has an unexpected length -- must be 16 bytes"); |
| 156 } |
| 157 |
| 158 Status Status::ErrorInvalidAesCtrCounterLength() { |
| 159 return Status(blink::WebCryptoErrorTypeData, |
| 160 "The \"length\" property must be >= 1 and <= 128"); |
| 161 } |
| 162 |
| 163 Status Status::ErrorAesCtrInputTooLongCounterRepeated() { |
| 164 return Status(blink::WebCryptoErrorTypeData, |
| 165 "The input is too large for the counter length."); |
| 166 } |
| 167 |
153 Status Status::ErrorDataTooLarge() { | 168 Status Status::ErrorDataTooLarge() { |
154 return Status(blink::WebCryptoErrorTypeData, | 169 return Status(blink::WebCryptoErrorTypeData, |
155 "The provided data is too large"); | 170 "The provided data is too large"); |
156 } | 171 } |
157 | 172 |
158 Status Status::ErrorDataTooSmall() { | 173 Status Status::ErrorDataTooSmall() { |
159 return Status(blink::WebCryptoErrorTypeData, | 174 return Status(blink::WebCryptoErrorTypeData, |
160 "The provided data is too small"); | 175 "The provided data is too small"); |
161 } | 176 } |
162 | 177 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 error_type_(error_type), | 243 error_type_(error_type), |
229 error_details_(error_details_utf8) { | 244 error_details_(error_details_utf8) { |
230 } | 245 } |
231 | 246 |
232 Status::Status(Type type) : type_(type) { | 247 Status::Status(Type type) : type_(type) { |
233 } | 248 } |
234 | 249 |
235 } // namespace webcrypto | 250 } // namespace webcrypto |
236 | 251 |
237 } // namespace content | 252 } // namespace content |
OLD | NEW |