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

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

Issue 118623002: [webcrypto] Add raw symmetric key AES-KW wrap/unwrap for NSS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase and refactor 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_RENDERER_WEBCRYPTO_PLATFORM_CRYPTO_H_ 5 #ifndef CONTENT_RENDERER_WEBCRYPTO_PLATFORM_CRYPTO_H_
6 #define CONTENT_RENDERER_WEBCRYPTO_PLATFORM_CRYPTO_H_ 6 #define CONTENT_RENDERER_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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 blink::WebCryptoKey* key); 169 blink::WebCryptoKey* key);
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:
180 // * |wrapping_key| is non-null
181 // * |key| is non-null
182 Status WrapSymKeyAesKw(SymKey* wrapping_key,
183 SymKey* key,
184 blink::WebArrayBuffer* buffer);
185
186 // Preconditions:
187 // * |wrapping_key| is non-null
188 // * |key| is non-null
189 // * |algorithm.id()| is for a symmetric key algorithm.
190 // * |wrapped_key_data| is at least 24 bytes and a multiple of 8 bytes
eroman 2014/03/01 01:13:54 This is not currently guranteed as the checks are
padolph 2014/03/01 01:55:01 Done.
191 Status UnwrapSymKeyAesKw(const CryptoData& wrapped_key_data,
192 SymKey* wrapping_key,
193 const blink::WebCryptoAlgorithm& algorithm,
194 bool extractable,
195 blink::WebCryptoKeyUsageMask usage_mask,
196 blink::WebCryptoKey* key);
197
179 } // namespace platform 198 } // namespace platform
180 199
181 } // namespace webcrypto 200 } // namespace webcrypto
182 201
183 } // namespace content 202 } // namespace content
184 203
185 #endif // CONTENT_RENDERER_WEBCRYPTO_PLATFORM_CRYPTO_H_ 204 #endif // CONTENT_RENDERER_WEBCRYPTO_PLATFORM_CRYPTO_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/webcrypto/platform_crypto_nss.cc » ('j') | content/renderer/webcrypto/platform_crypto_nss.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698