/* * Copyright (c) 2021-2022, Linus Groh * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include namespace Web::Crypto { class SubtleCrypto final : public Bindings::PlatformObject { WEB_PLATFORM_OBJECT(SubtleCrypto, Bindings::PlatformObject); public: static JS::NonnullGCPtr create(HTML::Window&); virtual ~SubtleCrypto() override; JS::Promise* digest(String const& algorithm, JS::Handle const& data); private: explicit SubtleCrypto(HTML::Window&); }; } WRAPPER_HACK(SubtleCrypto, Web::Crypto)