1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-17 14:55:09 +00:00
serenity/Userland/Libraries/LibWeb/Crypto/SubtleCrypto.h
2022-09-06 00:27:09 +02:00

30 lines
651 B
C++

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