blob: 3645279c7ec51e1f76a443f53684945335b9b0aa [file] [log] [blame]
[email protected]37be4cfa2014-03-20 05:39:371// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
erg56f12322015-04-17 00:51:485#include "components/webcrypto/status.h"
[email protected]37be4cfa2014-03-20 05:39:376
eromanb2ead6d2014-11-14 02:26:147#include "base/format_macros.h"
8#include "base/strings/stringprintf.h"
9
[email protected]37be4cfa2014-03-20 05:39:3710namespace webcrypto {
11
[email protected]c5039362014-04-28 19:10:3412bool Status::IsError() const {
13 return type_ == TYPE_ERROR;
[email protected]37be4cfa2014-03-20 05:39:3714}
15
[email protected]c5039362014-04-28 19:10:3416bool Status::IsSuccess() const {
17 return type_ == TYPE_SUCCESS;
18}
[email protected]37be4cfa2014-03-20 05:39:3719
[email protected]c5039362014-04-28 19:10:3420Status Status::Success() {
21 return Status(TYPE_SUCCESS);
22}
23
24Status Status::OperationError() {
Blink Reformat1c4d759e2017-04-09 16:34:5425 return Status(blink::kWebCryptoErrorTypeOperation, "");
[email protected]c5039362014-04-28 19:10:3426}
27
28Status Status::DataError() {
Blink Reformat1c4d759e2017-04-09 16:34:5429 return Status(blink::kWebCryptoErrorTypeData, "");
[email protected]c5039362014-04-28 19:10:3430}
[email protected]37be4cfa2014-03-20 05:39:3731
32Status Status::ErrorJwkNotDictionary() {
Blink Reformat1c4d759e2017-04-09 16:34:5433 return Status(blink::kWebCryptoErrorTypeData,
[email protected]c5039362014-04-28 19:10:3434 "JWK input could not be parsed to a JSON dictionary");
[email protected]37be4cfa2014-03-20 05:39:3735}
36
eroman398e7e12014-11-08 03:05:1037Status Status::ErrorJwkMemberMissing(const std::string& member_name) {
Blink Reformat1c4d759e2017-04-09 16:34:5438 return Status(blink::kWebCryptoErrorTypeData,
eroman8c565ba2014-12-10 20:59:0639 "The required JWK member \"" + member_name + "\" was missing");
[email protected]37be4cfa2014-03-20 05:39:3740}
41
eroman398e7e12014-11-08 03:05:1042Status Status::ErrorJwkMemberWrongType(const std::string& member_name,
43 const std::string& expected_type) {
[email protected]c5039362014-04-28 19:10:3444 return Status(
Blink Reformat1c4d759e2017-04-09 16:34:5445 blink::kWebCryptoErrorTypeData,
eroman8c565ba2014-12-10 20:59:0646 "The JWK member \"" + member_name + "\" must be a " + expected_type);
eroman398e7e12014-11-08 03:05:1047}
48
49Status Status::ErrorJwkBase64Decode(const std::string& member_name) {
Blink Reformat1c4d759e2017-04-09 16:34:5450 return Status(blink::kWebCryptoErrorTypeData,
eroman8c565ba2014-12-10 20:59:0651 "The JWK member \"" + member_name +
52 "\" could not be base64url decoded or contained padding");
[email protected]37be4cfa2014-03-20 05:39:3753}
54
55Status Status::ErrorJwkExtInconsistent() {
56 return Status(
Blink Reformat1c4d759e2017-04-09 16:34:5457 blink::kWebCryptoErrorTypeData,
eroman8c565ba2014-12-10 20:59:0658 "The \"ext\" member of the JWK dictionary is inconsistent what that "
[email protected]37be4cfa2014-03-20 05:39:3759 "specified by the Web Crypto call");
60}
61
[email protected]37be4cfa2014-03-20 05:39:3762Status Status::ErrorJwkAlgorithmInconsistent() {
Blink Reformat1c4d759e2017-04-09 16:34:5463 return Status(blink::kWebCryptoErrorTypeData,
eroman8c565ba2014-12-10 20:59:0664 "The JWK \"alg\" member was inconsistent with that specified "
[email protected]c5039362014-04-28 19:10:3465 "by the Web Crypto call");
[email protected]37be4cfa2014-03-20 05:39:3766}
67
[email protected]37be4cfa2014-03-20 05:39:3768Status Status::ErrorJwkUnrecognizedUse() {
Blink Reformat1c4d759e2017-04-09 16:34:5469 return Status(blink::kWebCryptoErrorTypeData,
eroman8c565ba2014-12-10 20:59:0670 "The JWK \"use\" member could not be parsed");
[email protected]37be4cfa2014-03-20 05:39:3771}
72
73Status Status::ErrorJwkUnrecognizedKeyop() {
Blink Reformat1c4d759e2017-04-09 16:34:5474 return Status(blink::kWebCryptoErrorTypeData,
eroman8c565ba2014-12-10 20:59:0675 "The JWK \"key_ops\" member could not be parsed");
[email protected]37be4cfa2014-03-20 05:39:3776}
77
78Status Status::ErrorJwkUseInconsistent() {
Blink Reformat1c4d759e2017-04-09 16:34:5479 return Status(blink::kWebCryptoErrorTypeData,
eroman8c565ba2014-12-10 20:59:0680 "The JWK \"use\" member was inconsistent with that specified "
[email protected]c5039362014-04-28 19:10:3481 "by the Web Crypto call. The JWK usage must be a superset of "
82 "those requested");
[email protected]37be4cfa2014-03-20 05:39:3783}
84
85Status Status::ErrorJwkKeyopsInconsistent() {
Blink Reformat1c4d759e2017-04-09 16:34:5486 return Status(blink::kWebCryptoErrorTypeData,
eroman8c565ba2014-12-10 20:59:0687 "The JWK \"key_ops\" member was inconsistent with that "
[email protected]c5039362014-04-28 19:10:3488 "specified by the Web Crypto call. The JWK usage must be a "
89 "superset of those requested");
[email protected]37be4cfa2014-03-20 05:39:3790}
91
92Status Status::ErrorJwkUseAndKeyopsInconsistent() {
Blink Reformat1c4d759e2017-04-09 16:34:5493 return Status(blink::kWebCryptoErrorTypeData,
[email protected]c5039362014-04-28 19:10:3494 "The JWK \"use\" and \"key_ops\" properties were both found "
95 "but are inconsistent with each other.");
[email protected]37be4cfa2014-03-20 05:39:3796}
97
[email protected]38409aec2014-07-19 00:54:5198Status Status::ErrorJwkUnexpectedKty(const std::string& expected) {
Blink Reformat1c4d759e2017-04-09 16:34:5499 return Status(blink::kWebCryptoErrorTypeData,
eroman8c565ba2014-12-10 20:59:06100 "The JWK \"kty\" member was not \"" + expected + "\"");
[email protected]37be4cfa2014-03-20 05:39:37101}
102
103Status Status::ErrorJwkIncorrectKeyLength() {
Blink Reformat1c4d759e2017-04-09 16:34:54104 return Status(blink::kWebCryptoErrorTypeData,
eroman8c565ba2014-12-10 20:59:06105 "The JWK \"k\" member did not include the right length "
[email protected]c5039362014-04-28 19:10:34106 "of key data for the given algorithm.");
[email protected]37be4cfa2014-03-20 05:39:37107}
108
eroman398e7e12014-11-08 03:05:10109Status Status::ErrorJwkEmptyBigInteger(const std::string& member_name) {
Blink Reformat1c4d759e2017-04-09 16:34:54110 return Status(blink::kWebCryptoErrorTypeData,
eroman8c565ba2014-12-10 20:59:06111 "The JWK \"" + member_name + "\" member was empty.");
[email protected]31130d6c2014-07-26 19:59:14112}
113
eroman398e7e12014-11-08 03:05:10114Status Status::ErrorJwkBigIntegerHasLeadingZero(
115 const std::string& member_name) {
[email protected]31130d6c2014-07-26 19:59:14116 return Status(
Blink Reformat1c4d759e2017-04-09 16:34:54117 blink::kWebCryptoErrorTypeData,
eroman8c565ba2014-12-10 20:59:06118 "The JWK \"" + member_name + "\" member contained a leading zero.");
[email protected]6f82af22014-05-21 15:26:14119}
120
eromanca92d1e2014-10-28 01:15:18121Status Status::ErrorJwkDuplicateKeyOps() {
Blink Reformat1c4d759e2017-04-09 16:34:54122 return Status(blink::kWebCryptoErrorTypeData,
eroman8c565ba2014-12-10 20:59:06123 "The \"key_ops\" member of the JWK dictionary contains "
eromanca92d1e2014-10-28 01:15:18124 "duplicate usages.");
125}
126
[email protected]38409aec2014-07-19 00:54:51127Status Status::ErrorUnsupportedImportKeyFormat() {
Blink Reformat1c4d759e2017-04-09 16:34:54128 return Status(blink::kWebCryptoErrorTypeNotSupported,
[email protected]38409aec2014-07-19 00:54:51129 "Unsupported import key format for algorithm");
130}
131
132Status Status::ErrorUnsupportedExportKeyFormat() {
Blink Reformat1c4d759e2017-04-09 16:34:54133 return Status(blink::kWebCryptoErrorTypeNotSupported,
[email protected]38409aec2014-07-19 00:54:51134 "Unsupported export key format for algorithm");
135}
136
[email protected]c5039362014-04-28 19:10:34137Status Status::ErrorImportAesKeyLength() {
Blink Reformat1c4d759e2017-04-09 16:34:54138 return Status(blink::kWebCryptoErrorTypeData,
eromanbe884dce2014-11-26 21:23:29139 "AES key data must be 128 or 256 bits");
[email protected]37be4cfa2014-03-20 05:39:37140}
141
eromanf93fd5b2014-12-11 00:21:06142Status Status::ErrorGetAesKeyLength() {
Blink Reformat1c4d759e2017-04-09 16:34:54143 return Status(blink::kWebCryptoErrorTypeOperation,
eromanf93fd5b2014-12-11 00:21:06144 "AES key length must be 128 or 256 bits");
145}
146
eroman9e9ed052014-11-26 03:00:40147Status Status::ErrorGenerateAesKeyLength() {
Blink Reformat1c4d759e2017-04-09 16:34:54148 return Status(blink::kWebCryptoErrorTypeOperation,
eroman9e9ed052014-11-26 03:00:40149 "AES key length must be 128 or 256 bits");
150}
151
[email protected]b05ba932014-06-13 08:49:15152Status Status::ErrorAes192BitUnsupported() {
Blink Reformat1c4d759e2017-04-09 16:34:54153 return Status(blink::kWebCryptoErrorTypeOperation,
[email protected]b05ba932014-06-13 08:49:15154 "192-bit AES keys are not supported");
155}
156
[email protected]37be4cfa2014-03-20 05:39:37157Status Status::ErrorUnexpectedKeyType() {
Blink Reformat1c4d759e2017-04-09 16:34:54158 return Status(blink::kWebCryptoErrorTypeInvalidAccess,
[email protected]c5039362014-04-28 19:10:34159 "The key is not of the expected type");
[email protected]37be4cfa2014-03-20 05:39:37160}
161
162Status Status::ErrorIncorrectSizeAesCbcIv() {
Blink Reformat1c4d759e2017-04-09 16:34:54163 return Status(blink::kWebCryptoErrorTypeOperation,
[email protected]c5039362014-04-28 19:10:34164 "The \"iv\" has an unexpected length -- must be 16 bytes");
[email protected]37be4cfa2014-03-20 05:39:37165}
166
eroman4d7a0e02014-08-27 00:30:33167Status Status::ErrorIncorrectSizeAesCtrCounter() {
Blink Reformat1c4d759e2017-04-09 16:34:54168 return Status(blink::kWebCryptoErrorTypeOperation,
eroman4d7a0e02014-08-27 00:30:33169 "The \"counter\" has an unexpected length -- must be 16 bytes");
170}
171
172Status Status::ErrorInvalidAesCtrCounterLength() {
Blink Reformat1c4d759e2017-04-09 16:34:54173 return Status(blink::kWebCryptoErrorTypeOperation,
eroman8c565ba2014-12-10 20:59:06174 "The \"length\" member must be >= 1 and <= 128");
eroman4d7a0e02014-08-27 00:30:33175}
176
177Status Status::ErrorAesCtrInputTooLongCounterRepeated() {
Blink Reformat1c4d759e2017-04-09 16:34:54178 return Status(blink::kWebCryptoErrorTypeData,
eroman4d7a0e02014-08-27 00:30:33179 "The input is too large for the counter length.");
180}
181
[email protected]37be4cfa2014-03-20 05:39:37182Status Status::ErrorDataTooLarge() {
Blink Reformat1c4d759e2017-04-09 16:34:54183 return Status(blink::kWebCryptoErrorTypeOperation,
[email protected]c5039362014-04-28 19:10:34184 "The provided data is too large");
[email protected]37be4cfa2014-03-20 05:39:37185}
186
187Status Status::ErrorDataTooSmall() {
Blink Reformat1c4d759e2017-04-09 16:34:54188 return Status(blink::kWebCryptoErrorTypeOperation,
[email protected]c5039362014-04-28 19:10:34189 "The provided data is too small");
[email protected]37be4cfa2014-03-20 05:39:37190}
191
192Status Status::ErrorUnsupported() {
[email protected]cb7f3e32014-06-19 14:41:41193 return ErrorUnsupported("The requested operation is unsupported");
194}
195
196Status Status::ErrorUnsupported(const std::string& message) {
Blink Reformat1c4d759e2017-04-09 16:34:54197 return Status(blink::kWebCryptoErrorTypeNotSupported, message);
[email protected]37be4cfa2014-03-20 05:39:37198}
199
200Status Status::ErrorUnexpected() {
Blink Reformat1c4d759e2017-04-09 16:34:54201 return Status(blink::kWebCryptoErrorTypeOperation,
[email protected]c5039362014-04-28 19:10:34202 "Something unexpected happened...");
[email protected]37be4cfa2014-03-20 05:39:37203}
204
205Status Status::ErrorInvalidAesGcmTagLength() {
206 return Status(
Blink Reformat1c4d759e2017-04-09 16:34:54207 blink::kWebCryptoErrorTypeOperation,
[email protected]37be4cfa2014-03-20 05:39:37208 "The tag length is invalid: Must be 32, 64, 96, 104, 112, 120, or 128 "
209 "bits");
210}
211
212Status Status::ErrorInvalidAesKwDataLength() {
Blink Reformat1c4d759e2017-04-09 16:34:54213 return Status(blink::kWebCryptoErrorTypeData,
[email protected]c5039362014-04-28 19:10:34214 "The AES-KW input data length is invalid: not a multiple of 8 "
215 "bytes");
[email protected]37be4cfa2014-03-20 05:39:37216}
217
218Status Status::ErrorGenerateKeyPublicExponent() {
Blink Reformat1c4d759e2017-04-09 16:34:54219 return Status(blink::kWebCryptoErrorTypeOperation,
[email protected]c360f832014-06-12 13:21:50220 "The \"publicExponent\" must be either 3 or 65537");
[email protected]37be4cfa2014-03-20 05:39:37221}
222
[email protected]37be4cfa2014-03-20 05:39:37223Status Status::ErrorImportRsaEmptyModulus() {
Blink Reformat1c4d759e2017-04-09 16:34:54224 return Status(blink::kWebCryptoErrorTypeData, "The modulus is empty");
[email protected]37be4cfa2014-03-20 05:39:37225}
226
[email protected]e9aa71a2014-07-25 08:38:02227Status Status::ErrorGenerateRsaUnsupportedModulus() {
Blink Reformat1c4d759e2017-04-09 16:34:54228 return Status(blink::kWebCryptoErrorTypeOperation,
[email protected]e9aa71a2014-07-25 08:38:02229 "The modulus length must be a multiple of 8 bits and >= 256 "
230 "and <= 16384");
[email protected]37be4cfa2014-03-20 05:39:37231}
232
233Status Status::ErrorImportRsaEmptyExponent() {
Blink Reformat1c4d759e2017-04-09 16:34:54234 return Status(blink::kWebCryptoErrorTypeData,
[email protected]c5039362014-04-28 19:10:34235 "No bytes for the exponent were provided");
[email protected]37be4cfa2014-03-20 05:39:37236}
237
238Status Status::ErrorKeyNotExtractable() {
Blink Reformat1c4d759e2017-04-09 16:34:54239 return Status(blink::kWebCryptoErrorTypeInvalidAccess,
[email protected]c5039362014-04-28 19:10:34240 "They key is not extractable");
[email protected]37be4cfa2014-03-20 05:39:37241}
242
eroman9e9ed052014-11-26 03:00:40243Status Status::ErrorGenerateHmacKeyLengthZero() {
Blink Reformat1c4d759e2017-04-09 16:34:54244 return Status(blink::kWebCryptoErrorTypeOperation,
xun.sune5737552014-12-02 23:52:24245 "HMAC key length must not be zero");
eroman9e9ed052014-11-26 03:00:40246}
247
eroman825de712014-12-29 22:34:10248Status Status::ErrorHmacImportEmptyKey() {
Blink Reformat1c4d759e2017-04-09 16:34:54249 return Status(blink::kWebCryptoErrorTypeData,
eroman825de712014-12-29 22:34:10250 "HMAC key data must not be empty");
251}
252
eromanf93fd5b2014-12-11 00:21:06253Status Status::ErrorGetHmacKeyLengthZero() {
Blink Reformat1c4d759e2017-04-09 16:34:54254 return Status(blink::kWebCryptoErrorTypeType,
eromanf93fd5b2014-12-11 00:21:06255 "HMAC key length must not be zero");
256}
257
eroman5d5199742014-12-10 22:18:07258Status Status::ErrorHmacImportBadLength() {
259 return Status(
Blink Reformat1c4d759e2017-04-09 16:34:54260 blink::kWebCryptoErrorTypeData,
eroman5d5199742014-12-10 22:18:07261 "The optional HMAC key length must be shorter than the key data, and by "
262 "no more than 7 bits.");
263}
264
[email protected]9c2e9cf2014-05-23 23:13:47265Status Status::ErrorCreateKeyBadUsages() {
Blink Reformat1c4d759e2017-04-09 16:34:54266 return Status(blink::kWebCryptoErrorTypeSyntax,
[email protected]9c2e9cf2014-05-23 23:13:47267 "Cannot create a key using the specified key usages.");
268}
269
nharper70f820a2014-12-03 20:36:07270Status Status::ErrorCreateKeyEmptyUsages() {
Blink Reformat1c4d759e2017-04-09 16:34:54271 return Status(blink::kWebCryptoErrorTypeSyntax,
nharper70f820a2014-12-03 20:36:07272 "Usages cannot be empty when creating a key.");
273}
274
eromanb2ead6d2014-11-14 02:26:14275Status Status::ErrorImportedEcKeyIncorrectCurve() {
276 return Status(
Blink Reformat1c4d759e2017-04-09 16:34:54277 blink::kWebCryptoErrorTypeData,
eromanb2ead6d2014-11-14 02:26:14278 "The imported EC key specifies a different curve than requested");
279}
280
281Status Status::ErrorJwkIncorrectCrv() {
282 return Status(
Blink Reformat1c4d759e2017-04-09 16:34:54283 blink::kWebCryptoErrorTypeData,
eromanb2ead6d2014-11-14 02:26:14284 "The JWK's \"crv\" member specifies a different curve than requested");
285}
286
287Status Status::ErrorEcKeyInvalid() {
Blink Reformat1c4d759e2017-04-09 16:34:54288 return Status(blink::kWebCryptoErrorTypeData,
eromanb2ead6d2014-11-14 02:26:14289 "The imported EC key is invalid");
290}
291
292Status Status::JwkOctetStringWrongLength(const std::string& member_name,
293 size_t expected_length,
294 size_t actual_length) {
295 return Status(
Blink Reformat1c4d759e2017-04-09 16:34:54296 blink::kWebCryptoErrorTypeData,
eromanb2ead6d2014-11-14 02:26:14297 base::StringPrintf(
298 "The JWK's \"%s\" member defines an octet string of length %" PRIuS
299 " bytes but should be %" PRIuS,
300 member_name.c_str(), actual_length, expected_length));
301}
302
eromaned48e812014-11-28 19:59:13303Status Status::ErrorEcdhPublicKeyWrongType() {
304 return Status(
Blink Reformat1c4d759e2017-04-09 16:34:54305 blink::kWebCryptoErrorTypeInvalidAccess,
eromaned48e812014-11-28 19:59:13306 "The public parameter for ECDH key derivation is not a public EC key");
307}
308
309Status Status::ErrorEcdhPublicKeyWrongAlgorithm() {
310 return Status(
Blink Reformat1c4d759e2017-04-09 16:34:54311 blink::kWebCryptoErrorTypeInvalidAccess,
eromaned48e812014-11-28 19:59:13312 "The public parameter for ECDH key derivation must be for ECDH");
313}
314
315Status Status::ErrorEcdhCurveMismatch() {
Blink Reformat1c4d759e2017-04-09 16:34:54316 return Status(blink::kWebCryptoErrorTypeInvalidAccess,
eromaned48e812014-11-28 19:59:13317 "The public parameter for ECDH key derivation is for a "
318 "different named curve");
319}
320
321Status Status::ErrorEcdhLengthTooBig(unsigned int max_length_bits) {
Blink Reformat1c4d759e2017-04-09 16:34:54322 return Status(blink::kWebCryptoErrorTypeOperation,
eromaned48e812014-11-28 19:59:13323 base::StringPrintf(
324 "Length specified for ECDH key derivation is too large. "
325 "Maximum allowed is %u bits",
326 max_length_bits));
327}
328
nharper651031792015-01-13 18:10:39329Status Status::ErrorHkdfLengthTooLong() {
Blink Reformat1c4d759e2017-04-09 16:34:54330 return Status(blink::kWebCryptoErrorTypeOperation,
nharper651031792015-01-13 18:10:39331 "The length provided for HKDF is too large.");
332}
333
eroman4451821b2017-04-26 19:30:24334Status Status::ErrorHkdfLengthNotWholeByte() {
335 return Status(blink::kWebCryptoErrorTypeOperation,
336 "The length provided for HKDF is not a multiple of 8 bits.");
337}
338
nharper651031792015-01-13 18:10:39339Status Status::ErrorHkdfDeriveBitsLengthNotSpecified() {
340 // TODO(nharper): The spec might change so that an OperationError should be
341 // thrown here instead of a TypeError.
342 // (https://www.w3.org/Bugs/Public/show_bug.cgi?id=27771)
Blink Reformat1c4d759e2017-04-09 16:34:54343 return Status(blink::kWebCryptoErrorTypeType,
nharper651031792015-01-13 18:10:39344 "No length was specified for the HKDF Derive Bits operation.");
345}
346
xun.sun22a80e72015-01-21 13:57:19347Status Status::ErrorPbkdf2InvalidLength() {
348 return Status(
Blink Reformat1c4d759e2017-04-09 16:34:54349 blink::kWebCryptoErrorTypeOperation,
xun.sun22a80e72015-01-21 13:57:19350 "Length for PBKDF2 key derivation must be a multiple of 8 bits.");
351}
352
353Status Status::ErrorPbkdf2DeriveBitsLengthNotSpecified() {
354 return Status(
Blink Reformat1c4d759e2017-04-09 16:34:54355 blink::kWebCryptoErrorTypeOperation,
xun.sun22a80e72015-01-21 13:57:19356 "No length was specified for the PBKDF2 Derive Bits operation.");
357}
358
eroman2d840b62016-07-19 22:04:21359Status Status::ErrorPbkdf2DeriveBitsLengthZero() {
360 return Status(
Blink Reformat1c4d759e2017-04-09 16:34:54361 blink::kWebCryptoErrorTypeOperation,
eroman2d840b62016-07-19 22:04:21362 "A length of 0 was specified for PBKDF2's Derive Bits operation.");
363}
364
eroman79616642015-10-05 21:18:14365Status Status::ErrorPbkdf2Iterations0() {
Blink Reformat1c4d759e2017-04-09 16:34:54366 return Status(blink::kWebCryptoErrorTypeOperation,
eroman79616642015-10-05 21:18:14367 "PBKDF2 requires iterations > 0");
368}
369
eromanc9529a82016-09-07 18:59:26370Status Status::ErrorImportExtractableKdfKey() {
Blink Reformat1c4d759e2017-04-09 16:34:54371 return Status(blink::kWebCryptoErrorTypeSyntax,
eromanc9529a82016-09-07 18:59:26372 "KDF keys must set extractable=false");
373}
374
[email protected]c5039362014-04-28 19:10:34375Status::Status(blink::WebCryptoErrorType error_type,
376 const std::string& error_details_utf8)
377 : type_(TYPE_ERROR),
378 error_type_(error_type),
379 error_details_(error_details_utf8) {
380}
[email protected]37be4cfa2014-03-20 05:39:37381
[email protected]c5039362014-04-28 19:10:34382Status::Status(Type type) : type_(type) {
383}
[email protected]37be4cfa2014-03-20 05:39:37384
385} // namespace webcrypto