CryptoAlgorithmRSA_OAEP.h [plain text]
#ifndef CryptoAlgorithmRSA_OAEP_h
#define CryptoAlgorithmRSA_OAEP_h
#include "CryptoAlgorithm.h"
#if ENABLE(SUBTLE_CRYPTO)
namespace WebCore {
class CryptoAlgorithmRsaOaepParams;
class CryptoKeyRSA;
class CryptoAlgorithmRSA_OAEP final : public CryptoAlgorithm {
public:
static const char* const s_name;
static const CryptoAlgorithmIdentifier s_identifier = CryptoAlgorithmIdentifier::RSA_OAEP;
static std::unique_ptr<CryptoAlgorithm> create();
virtual CryptoAlgorithmIdentifier identifier() const override;
virtual void encrypt(const CryptoAlgorithmParameters&, const CryptoKey&, const CryptoOperationData&, VectorCallback, VoidCallback failureCallback, ExceptionCode&) override;
virtual void decrypt(const CryptoAlgorithmParameters&, const CryptoKey&, const CryptoOperationData&, VectorCallback, VoidCallback failureCallback, ExceptionCode&) override;
virtual void generateKey(const CryptoAlgorithmParameters&, bool extractable, CryptoKeyUsage, KeyOrKeyPairCallback, VoidCallback failureCallback, ExceptionCode&) override;
virtual void importKey(const CryptoAlgorithmParameters&, const CryptoKeyData&, bool extractable, CryptoKeyUsage, KeyCallback, VoidCallback failureCallback, ExceptionCode&) override;
private:
CryptoAlgorithmRSA_OAEP();
virtual ~CryptoAlgorithmRSA_OAEP();
bool keyAlgorithmMatches(const CryptoAlgorithmRsaOaepParams& algorithmParameters, const CryptoKey&) const;
void platformEncrypt(const CryptoAlgorithmRsaOaepParams&, const CryptoKeyRSA&, const CryptoOperationData&, VectorCallback, VoidCallback failureCallback, ExceptionCode&);
void platformDecrypt(const CryptoAlgorithmRsaOaepParams&, const CryptoKeyRSA&, const CryptoOperationData&, VectorCallback, VoidCallback failureCallback, ExceptionCode&);
};
}
#endif // ENABLE(SUBTLE_CRYPTO)
#endif // CryptoAlgorithmRSA_OAEP_h