ladybird/Userland/Libraries/LibWeb/Crypto/SubtleCrypto.h

29 lines
610 B
C
Raw Normal View History

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