CryptoAlgorithmRSA_PSS.h [plain text]
#pragma once
#include "CryptoAlgorithm.h"
#if ENABLE(SUBTLE_CRYPTO) && HAVE(RSA_PSS)
namespace WebCore {
class CryptoAlgorithmRsaPssParams;
class CryptoKeyRSA;
class CryptoAlgorithmRSA_PSS final : public CryptoAlgorithm {
public:
static constexpr const char* s_name = "RSA-PSS";
static constexpr CryptoAlgorithmIdentifier s_identifier = CryptoAlgorithmIdentifier::RSA_PSS;
static Ref<CryptoAlgorithm> create();
private:
CryptoAlgorithmRSA_PSS() = default;
CryptoAlgorithmIdentifier identifier() const final;
void sign(std::unique_ptr<CryptoAlgorithmParameters>&&, Ref<CryptoKey>&&, Vector<uint8_t>&&, VectorCallback&&, ExceptionCallback&&, ScriptExecutionContext&, WorkQueue&) final;
void verify(std::unique_ptr<CryptoAlgorithmParameters>&&, Ref<CryptoKey>&&, Vector<uint8_t>&& signature, Vector<uint8_t>&&, BoolCallback&&, ExceptionCallback&&, ScriptExecutionContext&, WorkQueue&) final;
void generateKey(const CryptoAlgorithmParameters&, bool extractable, CryptoKeyUsageBitmap, KeyOrKeyPairCallback&&, ExceptionCallback&&, ScriptExecutionContext&) final;
void importKey(CryptoKeyFormat, KeyData&&, const std::unique_ptr<CryptoAlgorithmParameters>&&, bool extractable, CryptoKeyUsageBitmap, KeyCallback&&, ExceptionCallback&&) final;
void exportKey(CryptoKeyFormat, Ref<CryptoKey>&&, KeyDataCallback&&, ExceptionCallback&&) final;
static ExceptionOr<Vector<uint8_t>> platformSign(CryptoAlgorithmRsaPssParams&, const CryptoKeyRSA&, const Vector<uint8_t>&);
static ExceptionOr<bool> platformVerify(CryptoAlgorithmRsaPssParams&, const CryptoKeyRSA&, const Vector<uint8_t>&, const Vector<uint8_t>&);
};
}
#endif // ENABLE(SUBTLE_CRYPTO) && HAVE(RSA_PSS)