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

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

Issue 205913002: [webcrypto] Add JWK RSA public key export for NSS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
« no previous file with comments | « content/child/webcrypto/jwk.cc ('k') | content/child/webcrypto/platform_crypto_nss.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 #ifndef CONTENT_CHILD_WEBCRYPTO_PLATFORM_CRYPTO_H_ 5 #ifndef CONTENT_CHILD_WEBCRYPTO_PLATFORM_CRYPTO_H_
6 #define CONTENT_CHILD_WEBCRYPTO_PLATFORM_CRYPTO_H_ 6 #define CONTENT_CHILD_WEBCRYPTO_PLATFORM_CRYPTO_H_
7 7
8 #include <vector>
8 #include "base/basictypes.h" 9 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
10 #include "third_party/WebKit/public/platform/WebArrayBuffer.h" 11 #include "third_party/WebKit/public/platform/WebArrayBuffer.h"
11 #include "third_party/WebKit/public/platform/WebCrypto.h" 12 #include "third_party/WebKit/public/platform/WebCrypto.h"
12 #include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h" 13 #include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h"
13 14
14 namespace content { 15 namespace content {
15 16
16 enum EncryptOrDecrypt { ENCRYPT, DECRYPT }; 17 enum EncryptOrDecrypt { ENCRYPT, DECRYPT };
17 18
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 // Preconditions: 172 // Preconditions:
172 // * |key| is non-null. 173 // * |key| is non-null.
173 Status ExportKeyRaw(SymKey* key, blink::WebArrayBuffer* buffer); 174 Status ExportKeyRaw(SymKey* key, blink::WebArrayBuffer* buffer);
174 175
175 // Preconditions: 176 // Preconditions:
176 // * |key| is non-null. 177 // * |key| is non-null.
177 Status ExportKeySpki(PublicKey* key, blink::WebArrayBuffer* buffer); 178 Status ExportKeySpki(PublicKey* key, blink::WebArrayBuffer* buffer);
178 179
179 // Preconditions: 180 // Preconditions:
180 // * |key| is non-null. 181 // * |key| is non-null.
182 Status ExportRsaPublicKey(PublicKey* key,
183 std::vector<uint8>* modulus,
184 std::vector<uint8>* public_exponent);
185
186 // Preconditions:
187 // * |key| is non-null.
181 Status ExportKeyPkcs8(PrivateKey* key, 188 Status ExportKeyPkcs8(PrivateKey* key,
182 const blink::WebCryptoKeyAlgorithm& key_algorithm, 189 const blink::WebCryptoKeyAlgorithm& key_algorithm,
183 blink::WebArrayBuffer* buffer); 190 blink::WebArrayBuffer* buffer);
184 191
185 // Preconditions: 192 // Preconditions:
186 // * |wrapping_key| is non-null 193 // * |wrapping_key| is non-null
187 // * |key| is non-null 194 // * |key| is non-null
188 Status WrapSymKeyAesKw(SymKey* wrapping_key, 195 Status WrapSymKeyAesKw(SymKey* wrapping_key,
189 SymKey* key, 196 SymKey* key,
190 blink::WebArrayBuffer* buffer); 197 blink::WebArrayBuffer* buffer);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 blink::WebCryptoKeyUsageMask usage_mask, 241 blink::WebCryptoKeyUsageMask usage_mask,
235 blink::WebCryptoKey* key); 242 blink::WebCryptoKey* key);
236 243
237 } // namespace platform 244 } // namespace platform
238 245
239 } // namespace webcrypto 246 } // namespace webcrypto
240 247
241 } // namespace content 248 } // namespace content
242 249
243 #endif // CONTENT_CHILD_WEBCRYPTO_PLATFORM_CRYPTO_H_ 250 #endif // CONTENT_CHILD_WEBCRYPTO_PLATFORM_CRYPTO_H_
OLDNEW
« no previous file with comments | « content/child/webcrypto/jwk.cc ('k') | content/child/webcrypto/platform_crypto_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698