Index: content/child/webcrypto/nss/sym_key_nss.h |
diff --git a/content/child/webcrypto/jwk.h b/content/child/webcrypto/nss/sym_key_nss.h |
similarity index 28% |
copy from content/child/webcrypto/jwk.h |
copy to content/child/webcrypto/nss/sym_key_nss.h |
index c9191888256d957f56c00da4bebe970307cca9c3..d6c1fe4d95e8d08f2a31afe907de01173c602e6b 100644 |
--- a/content/child/webcrypto/jwk.h |
+++ b/content/child/webcrypto/nss/sym_key_nss.h |
@@ -2,15 +2,12 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CONTENT_CHILD_WEBCRYPTO_JWK_H_ |
-#define CONTENT_CHILD_WEBCRYPTO_JWK_H_ |
+#ifndef CONTENT_CHILD_WEBCRYPTO_NSS_SYM_KEY_NSS_H_ |
+#define CONTENT_CHILD_WEBCRYPTO_NSS_SYM_KEY_NSS_H_ |
-#include <vector> |
+#include <pkcs11t.h> |
-#include "base/basictypes.h" |
-#include "third_party/WebKit/public/platform/WebArrayBuffer.h" |
#include "third_party/WebKit/public/platform/WebCrypto.h" |
-#include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h" |
namespace content { |
@@ -19,16 +16,23 @@ namespace webcrypto { |
class CryptoData; |
class Status; |
-Status ImportKeyJwk(const CryptoData& key_data, |
- const blink::WebCryptoAlgorithm& algorithm, |
- bool extractable, |
- blink::WebCryptoKeyUsageMask usage_mask, |
- blink::WebCryptoKey* key); |
- |
-Status ExportKeyJwk(const blink::WebCryptoKey& key, std::vector<uint8>* buffer); |
+Status GenerateSecretKeyNss(const blink::WebCryptoKeyAlgorithm& algorithm, |
+ bool extractable, |
+ blink::WebCryptoKeyUsageMask usage_mask, |
+ unsigned keylen_bytes, |
+ CK_MECHANISM_TYPE mechanism, |
+ blink::WebCryptoKey* key); |
+ |
+Status ImportKeyRawNss(const CryptoData& key_data, |
+ const blink::WebCryptoKeyAlgorithm& algorithm, |
+ bool extractable, |
+ blink::WebCryptoKeyUsageMask usage_mask, |
+ CK_MECHANISM_TYPE mechanism, |
+ CK_FLAGS flags, |
+ blink::WebCryptoKey* key); |
} // namespace webcrypto |
} // namespace content |
-#endif // CONTENT_CHILD_WEBCRYPTO_JWK_H_ |
+#endif // CONTENT_CHILD_WEBCRYPTO_NSS_SYM_KEY_NSS_H_ |