summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Crypto/Crypto.h
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-12-13 20:48:27 +0000
committerAndreas Kling <kling@serenityos.org>2021-12-14 09:01:06 +0100
commit615be9eb7ca88b20a13021cdf3eaf058c9059599 (patch)
tree03850ea8c22d72e09dc03f2e7ece2b8b7aaaa79a /Userland/Libraries/LibWeb/Crypto/Crypto.h
parentce6c515873072c4a51fe5cbc02755e9de7bbe952 (diff)
downloadserenity-615be9eb7ca88b20a13021cdf3eaf058c9059599.zip
LibWeb: Add the SubtleCrypto interface
Just some boilerplate code to get started :^) This adds both the SubtleCrypto constructor to the window object, as well as the crypto.subtle instance attribute.
Diffstat (limited to 'Userland/Libraries/LibWeb/Crypto/Crypto.h')
-rw-r--r--Userland/Libraries/LibWeb/Crypto/Crypto.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/Crypto/Crypto.h b/Userland/Libraries/LibWeb/Crypto/Crypto.h
index d469b7a48f..172e7de4e8 100644
--- a/Userland/Libraries/LibWeb/Crypto/Crypto.h
+++ b/Userland/Libraries/LibWeb/Crypto/Crypto.h
@@ -8,6 +8,7 @@
#include <LibJS/Runtime/Value.h>
#include <LibWeb/Bindings/Wrappable.h>
+#include <LibWeb/Crypto/SubtleCrypto.h>
#include <LibWeb/DOM/ExceptionOr.h>
namespace Web::Crypto {
@@ -23,10 +24,14 @@ public:
return adopt_ref(*new Crypto());
}
+ NonnullRefPtr<SubtleCrypto> subtle() const { return m_subtle; }
+
DOM::ExceptionOr<JS::Value> get_random_values(JS::Value array) const;
private:
- Crypto() = default;
+ Crypto();
+
+ NonnullRefPtr<SubtleCrypto> m_subtle;
};
}