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

Side by Side Diff: content/child/webcrypto/algorithm_dispatch.h

Issue 749183004: WebCrypto: Implement crypto.subtle.deriveKey (chromium-side). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ecdh
Patch Set: Created 6 years 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
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 #ifndef CONTENT_CHILD_WEBCRYPTO_ALGORITHM_DISPATCH_H_ 5 #ifndef CONTENT_CHILD_WEBCRYPTO_ALGORITHM_DISPATCH_H_
6 #define CONTENT_CHILD_WEBCRYPTO_ALGORITHM_DISPATCH_H_ 6 #define CONTENT_CHILD_WEBCRYPTO_ALGORITHM_DISPATCH_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 const blink::WebCryptoAlgorithm& algorithm, 85 const blink::WebCryptoAlgorithm& algorithm,
86 bool extractable, 86 bool extractable,
87 blink::WebCryptoKeyUsageMask usages, 87 blink::WebCryptoKeyUsageMask usages,
88 blink::WebCryptoKey* key); 88 blink::WebCryptoKey* key);
89 89
90 CONTENT_EXPORT Status DeriveBits(const blink::WebCryptoAlgorithm& algorithm, 90 CONTENT_EXPORT Status DeriveBits(const blink::WebCryptoAlgorithm& algorithm,
91 const blink::WebCryptoKey& base_key, 91 const blink::WebCryptoKey& base_key,
92 unsigned int length_bits, 92 unsigned int length_bits,
93 std::vector<uint8_t>* derived_bytes); 93 std::vector<uint8_t>* derived_bytes);
94 94
95 CONTENT_EXPORT Status
96 DeriveKey(const blink::WebCryptoAlgorithm& algorithm,
97 const blink::WebCryptoKey& base_key,
98 const blink::WebCryptoAlgorithm& import_algorithm,
99 const blink::WebCryptoAlgorithm& key_length_algorithm,
Ryan Sleevi 2014/12/10 03:21:26 Wait, why is |key_length_algorithm| different than
eroman 2014/12/10 17:58:55 I'll add a comment. In the spec there is a single
Ryan Sleevi 2014/12/11 23:23:48 Thanks. A comment for this sounds perfect.
eroman 2014/12/12 01:21:17 Done. I added this comment: // Derives a key by c
100 bool extractable,
101 blink::WebCryptoKeyUsageMask usages,
102 blink::WebCryptoKey* derived_key);
103
95 CONTENT_EXPORT scoped_ptr<blink::WebCryptoDigestor> CreateDigestor( 104 CONTENT_EXPORT scoped_ptr<blink::WebCryptoDigestor> CreateDigestor(
96 blink::WebCryptoAlgorithmId algorithm); 105 blink::WebCryptoAlgorithmId algorithm);
97 106
98 CONTENT_EXPORT bool SerializeKeyForClone(const blink::WebCryptoKey& key, 107 CONTENT_EXPORT bool SerializeKeyForClone(const blink::WebCryptoKey& key,
99 blink::WebVector<uint8_t>* key_data); 108 blink::WebVector<uint8_t>* key_data);
100 109
101 CONTENT_EXPORT bool DeserializeKeyForClone( 110 CONTENT_EXPORT bool DeserializeKeyForClone(
102 const blink::WebCryptoKeyAlgorithm& algorithm, 111 const blink::WebCryptoKeyAlgorithm& algorithm,
103 blink::WebCryptoKeyType type, 112 blink::WebCryptoKeyType type,
104 bool extractable, 113 bool extractable,
105 blink::WebCryptoKeyUsageMask usages, 114 blink::WebCryptoKeyUsageMask usages,
106 const CryptoData& key_data, 115 const CryptoData& key_data,
107 blink::WebCryptoKey* key); 116 blink::WebCryptoKey* key);
108 117
109 } // namespace webcrypto 118 } // namespace webcrypto
110 119
111 } // namespace content 120 } // namespace content
112 121
113 #endif // CONTENT_CHILD_WEBCRYPTO_ALGORITHM_DISPATCH_H_ 122 #endif // CONTENT_CHILD_WEBCRYPTO_ALGORITHM_DISPATCH_H_
OLDNEW
« no previous file with comments | « no previous file | content/child/webcrypto/algorithm_dispatch.cc » ('j') | content/child/webcrypto/openssl/ecdh_openssl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698