/* * 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 WebIDL::ExceptionOr> create(JS::Realm&); virtual ~SubtleCrypto() override; JS::NonnullGCPtr digest(String const& algorithm, JS::Handle const& data); private: explicit SubtleCrypto(JS::Realm&); virtual JS::ThrowCompletionOr initialize(JS::Realm&) override; }; }