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

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: re-upload 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 e808c11bfff2ee4f7fff09cae68e909515296448..c0b8b18de596d0fbe4128a4230142602de13bff7 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"
@@ -66,6 +68,8 @@ class CONTENT_EXPORT WebCryptoImpl
protected:
friend class WebCryptoImplTest;
+ std::map<std::string, int> jwk_algorithm_map_;
+
void Init();
bool EncryptInternal(
@@ -112,6 +116,15 @@ class CONTENT_EXPORT WebCryptoImpl
unsigned data_size,
bool* signature_match);
+ bool ImportKeyJwk(
+ const unsigned char* key_data,
+ unsigned key_data_size,
+ bool extractable,
+ const WebKit::WebCryptoAlgorithm& algorithm,
+ WebKit::WebCryptoKeyUsageMask usage_mask,
+ scoped_ptr<WebKit::WebCryptoKeyHandle>* handle,
+ WebKit::WebCryptoKeyType* type);
+
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