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

Unified Diff: content/renderer/webcrypto/webcrypto_impl.h

Issue 25906002: [webcrypto] Add JWK import for HMAC and AES-CBC key. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed some DCHECK's and TODO's. Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/webcrypto/webcrypto_impl.h
diff --git a/content/renderer/webcrypto/webcrypto_impl.h b/content/renderer/webcrypto/webcrypto_impl.h
index 9b2dd3e031d1edd295e428fa610852be15336d75..d1868892d3ed4aa68a468ad09624566f18abd977 100644
--- a/content/renderer/webcrypto/webcrypto_impl.h
+++ b/content/renderer/webcrypto/webcrypto_impl.h
@@ -5,6 +5,8 @@
#ifndef CONTENT_RENDERER_WEBCRYPTO_WEBCRYPTO_IMPL_H_
#define CONTENT_RENDERER_WEBCRYPTO_WEBCRYPTO_IMPL_H_
+#include <map>
+#include <string>
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
@@ -61,6 +63,8 @@ class CONTENT_EXPORT WebCryptoImpl
protected:
friend class WebCryptoImplTest;
+ std::map<std::string, int> jwk_algorithm_map_;
+
void Init();
bool EncryptInternal(
@@ -103,6 +107,16 @@ class CONTENT_EXPORT WebCryptoImpl
unsigned data_size,
bool* signature_match);
+ bool ImportKeyJwk(
+ const unsigned char* key_data,
+ unsigned key_data_size,
+ scoped_ptr<WebKit::WebCryptoKeyHandle>* handle,
+ WebKit::WebCryptoKeyType* type,
+ bool* extractable,
+ WebKit::WebCryptoAlgorithm* algorithm,
+ WebKit::WebCryptoKeyUsageMask* usage_mask);
+
+
private:
DISALLOW_COPY_AND_ASSIGN(WebCryptoImpl);
};
« no previous file with comments | « no previous file | content/renderer/webcrypto/webcrypto_impl.cc » ('j') | content/renderer/webcrypto/webcrypto_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698