Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(933)

Side by Side Diff: content/child/webcrypto/status.cc

Issue 491763002: [webcrypto] Implement AES-CTR using BoringSSL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase onto master (moves unittest to its own file) Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/child/webcrypto/status.h ('k') | content/child/webcrypto/test/aes_ctr_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/child/webcrypto/status.h ('k') | content/child/webcrypto/test/aes_ctr_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698