/* * Copyright (c) 2021, Idan Horowitz * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include namespace Web::Crypto { class Crypto : public Bindings::PlatformObject { WEB_PLATFORM_OBJECT(Crypto, Bindings::PlatformObject); public: static JS::NonnullGCPtr create(HTML::Window&); virtual ~Crypto() override; JS::NonnullGCPtr subtle() const; DOM::ExceptionOr get_random_values(JS::Value array) const; String random_uuid() const; protected: virtual void visit_edges(Cell::Visitor&) override; private: explicit Crypto(HTML::Window&); virtual void initialize(JS::Realm&) override; JS::GCPtr m_subtle; }; }