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

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

Issue 211943002: [webcrypto] Minor cleanup/consolidation of JWK source. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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
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_SHARED_CRYPTO_H_ 5 #ifndef CONTENT_CHILD_WEBCRYPTO_SHARED_CRYPTO_H_
6 #define CONTENT_CHILD_WEBCRYPTO_SHARED_CRYPTO_H_ 6 #define CONTENT_CHILD_WEBCRYPTO_SHARED_CRYPTO_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 const CryptoData& data, 116 const CryptoData& data,
117 blink::WebArrayBuffer* buffer); 117 blink::WebArrayBuffer* buffer);
118 118
119 CONTENT_EXPORT Status 119 CONTENT_EXPORT Status
120 VerifySignature(const blink::WebCryptoAlgorithm& algorithm, 120 VerifySignature(const blink::WebCryptoAlgorithm& algorithm,
121 const blink::WebCryptoKey& key, 121 const blink::WebCryptoKey& key,
122 const CryptoData& signature, 122 const CryptoData& signature,
123 const CryptoData& data, 123 const CryptoData& data,
124 bool* signature_match); 124 bool* signature_match);
125 125
126 CONTENT_EXPORT Status ImportKeyJwk(const CryptoData& key_data,
127 const blink::WebCryptoAlgorithm& algorithm,
128 bool extractable,
129 blink::WebCryptoKeyUsageMask usage_mask,
130 blink::WebCryptoKey* key);
131
132 CONTENT_EXPORT Status
133 ExportKeyJwk(const blink::WebCryptoKey& key, blink::WebArrayBuffer* buffer);
134
135 CONTENT_EXPORT Status 126 CONTENT_EXPORT Status
136 WrapKey(blink::WebCryptoKeyFormat format, 127 WrapKey(blink::WebCryptoKeyFormat format,
137 const blink::WebCryptoKey& wrapping_key, 128 const blink::WebCryptoKey& wrapping_key,
138 const blink::WebCryptoKey& key_to_wrap, 129 const blink::WebCryptoKey& key_to_wrap,
139 const blink::WebCryptoAlgorithm& wrapping_algorithm, 130 const blink::WebCryptoAlgorithm& wrapping_algorithm,
140 blink::WebArrayBuffer* buffer); 131 blink::WebArrayBuffer* buffer);
141 132
142 CONTENT_EXPORT Status 133 CONTENT_EXPORT Status
143 UnwrapKey(blink::WebCryptoKeyFormat format, 134 UnwrapKey(blink::WebCryptoKeyFormat format,
144 const CryptoData& wrapped_key_data, 135 const CryptoData& wrapped_key_data,
(...skipping 14 matching lines...) Expand all
159 bool extractable, 150 bool extractable,
160 blink::WebCryptoKeyUsageMask usage_mask, 151 blink::WebCryptoKeyUsageMask usage_mask,
161 const CryptoData& key_data, 152 const CryptoData& key_data,
162 blink::WebCryptoKey* key); 153 blink::WebCryptoKey* key);
163 154
164 } // namespace webcrypto 155 } // namespace webcrypto
165 156
166 } // namespace content 157 } // namespace content
167 158
168 #endif // CONTENT_CHILD_WEBCRYPTO_SHARED_CRYPTO_H_ 159 #endif // CONTENT_CHILD_WEBCRYPTO_SHARED_CRYPTO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698