/* * Copyright (c) 2021, Linus Groh * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include namespace Web::Crypto { class SubtleCrypto : public Bindings::Wrappable , public RefCounted { public: using WrapperType = Bindings::SubtleCryptoWrapper; static NonnullRefPtr create() { return adopt_ref(*new SubtleCrypto()); } JS::Promise* digest(String const& algorithm, JS::Handle const& data); private: SubtleCrypto() = default; }; } namespace Web::Bindings { SubtleCryptoWrapper* wrap(JS::GlobalObject&, Crypto::SubtleCrypto&); }