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

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
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 "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "third_party/WebKit/public/platform/WebArrayBuffer.h" 10 #include "third_party/WebKit/public/platform/WebArrayBuffer.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 170
171 // Preconditions: 171 // Preconditions:
172 // * |key| is non-null. 172 // * |key| is non-null.
173 Status ExportKeyRaw(SymKey* key, blink::WebArrayBuffer* buffer); 173 Status ExportKeyRaw(SymKey* key, blink::WebArrayBuffer* buffer);
174 174
175 // Preconditions: 175 // Preconditions:
176 // * |key| is non-null. 176 // * |key| is non-null.
177 Status ExportKeySpki(PublicKey* key, blink::WebArrayBuffer* buffer); 177 Status ExportKeySpki(PublicKey* key, blink::WebArrayBuffer* buffer);
178 178
179 // Preconditions: 179 // Preconditions:
180 // * |key| is non-null.
181 Status ExportRsaPublicKey(PublicKey* key,
182 blink::WebArrayBuffer* modulus,
eroman 2014/03/21 02:30:51 Please use a "std::vector<uint8>*" as the output t
padolph 2014/03/24 04:24:06 Done.
183 blink::WebArrayBuffer* public_exponent);
184
185 // Preconditions:
180 // * |wrapping_key| is non-null 186 // * |wrapping_key| is non-null
181 // * |key| is non-null 187 // * |key| is non-null
182 Status WrapSymKeyAesKw(SymKey* wrapping_key, 188 Status WrapSymKeyAesKw(SymKey* wrapping_key,
183 SymKey* key, 189 SymKey* key,
184 blink::WebArrayBuffer* buffer); 190 blink::WebArrayBuffer* buffer);
185 191
186 // Unwraps (decrypts) |wrapped_key_data| using AES-KW and places the results in 192 // Unwraps (decrypts) |wrapped_key_data| using AES-KW and places the results in
187 // a WebCryptoKey. Raw key data remains inside NSS. This function should be used 193 // a WebCryptoKey. Raw key data remains inside NSS. This function should be used
188 // when the input |wrapped_key_data| is known to result in symmetric raw key 194 // when the input |wrapped_key_data| is known to result in symmetric raw key
189 // data after AES-KW decryption. 195 // data after AES-KW decryption.
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 blink::WebCryptoKeyUsageMask usage_mask, 234 blink::WebCryptoKeyUsageMask usage_mask,
229 blink::WebCryptoKey* key); 235 blink::WebCryptoKey* key);
230 236
231 } // namespace platform 237 } // namespace platform
232 238
233 } // namespace webcrypto 239 } // namespace webcrypto
234 240
235 } // namespace content 241 } // namespace content
236 242
237 #endif // CONTENT_CHILD_WEBCRYPTO_PLATFORM_CRYPTO_H_ 243 #endif // CONTENT_CHILD_WEBCRYPTO_PLATFORM_CRYPTO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698