/* * Copyright (c) 2021, Idan Horowitz * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include namespace Web::Crypto { class Crypto : public Bindings::Wrappable , public RefCounted , public Weakable { public: using WrapperType = Bindings::CryptoWrapper; static NonnullRefPtr create() { return adopt_ref(*new Crypto()); } NonnullRefPtr subtle() const { return m_subtle; } DOM::ExceptionOr get_random_values(JS::Value array) const; private: Crypto(); NonnullRefPtr m_subtle; }; } namespace Web::Bindings { CryptoWrapper* wrap(JS::GlobalObject&, Crypto::Crypto&); }