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 #ifndef CONTENT_CHILD_WEBCRYPTO_GENERATE_KEY_RESULT_H_ | 5 #ifndef CONTENT_CHILD_WEBCRYPTO_GENERATE_KEY_RESULT_H_ |
6 #define CONTENT_CHILD_WEBCRYPTO_GENERATE_KEY_RESULT_H_ | 6 #define CONTENT_CHILD_WEBCRYPTO_GENERATE_KEY_RESULT_H_ |
7 | 7 |
8 #include "content/common/content_export.h" | |
9 #include "third_party/WebKit/public/platform/WebCrypto.h" | 8 #include "third_party/WebKit/public/platform/WebCrypto.h" |
10 | 9 |
11 namespace content { | 10 namespace components { |
12 | 11 |
13 namespace webcrypto { | 12 namespace webcrypto { |
14 | 13 |
15 // This is the result object when generating keys. It encapsulates either a | 14 // This is the result object when generating keys. It encapsulates either a |
16 // secret key, or a public/private key pair. | 15 // secret key, or a public/private key pair. |
17 class CONTENT_EXPORT GenerateKeyResult { | 16 class GenerateKeyResult { |
18 public: | 17 public: |
19 enum Type { | 18 enum Type { |
20 // An empty (or "null") result. | 19 // An empty (or "null") result. |
21 TYPE_NULL, | 20 TYPE_NULL, |
22 | 21 |
23 // The result is a secret key, accessible through secret_key() | 22 // The result is a secret key, accessible through secret_key() |
24 TYPE_SECRET_KEY, | 23 TYPE_SECRET_KEY, |
25 | 24 |
26 // The result is a public/private key pair, accessible through public_key() | 25 // The result is a public/private key pair, accessible through public_key() |
27 // and private_key() | 26 // and private_key() |
(...skipping 20 matching lines...) Expand all Loading... |
48 private: | 47 private: |
49 Type type_; | 48 Type type_; |
50 | 49 |
51 blink::WebCryptoKey secret_key_; | 50 blink::WebCryptoKey secret_key_; |
52 blink::WebCryptoKey public_key_; | 51 blink::WebCryptoKey public_key_; |
53 blink::WebCryptoKey private_key_; | 52 blink::WebCryptoKey private_key_; |
54 }; | 53 }; |
55 | 54 |
56 } // namespace webcrypto | 55 } // namespace webcrypto |
57 | 56 |
58 } // namespace content | 57 } // namespace components |
59 | 58 |
60 #endif // CONTENT_CHILD_WEBCRYPTO_GENERATE_KEY_RESULT_H_ | 59 #endif // CONTENT_CHILD_WEBCRYPTO_GENERATE_KEY_RESULT_H_ |
OLD | NEW |