///
/// HybridMlKemKeyPairSpec.hpp
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
/// https://github.com/mrousavy/nitro
/// Copyright © Marc Rousavy @ Margelo
///

#pragma once

#if __has_include(<NitroModules/HybridObject.hpp>)
#include <NitroModules/HybridObject.hpp>
#else
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
#endif



#include <string>
#include <NitroModules/Promise.hpp>
#include <NitroModules/ArrayBuffer.hpp>

namespace margelo::nitro::crypto {

  using namespace margelo::nitro;

  /**
   * An abstract base class for `MlKemKeyPair`
   * Inherit this class to create instances of `HybridMlKemKeyPairSpec` in C++.
   * You must explicitly call `HybridObject`'s constructor yourself, because it is virtual.
   * @example
   * ```cpp
   * class HybridMlKemKeyPair: public HybridMlKemKeyPairSpec {
   * public:
   *   HybridMlKemKeyPair(...): HybridObject(TAG) { ... }
   *   // ...
   * };
   * ```
   */
  class HybridMlKemKeyPairSpec: public virtual HybridObject {
    public:
      // Constructor
      explicit HybridMlKemKeyPairSpec(): HybridObject(TAG) { }

      // Destructor
      ~HybridMlKemKeyPairSpec() override = default;

    public:
      // Properties
      

    public:
      // Methods
      virtual void setVariant(const std::string& variant) = 0;
      virtual std::shared_ptr<Promise<void>> generateKeyPair(double publicFormat, double publicType, double privateFormat, double privateType) = 0;
      virtual void generateKeyPairSync(double publicFormat, double publicType, double privateFormat, double privateType) = 0;
      virtual std::shared_ptr<ArrayBuffer> getPublicKey() = 0;
      virtual std::shared_ptr<ArrayBuffer> getPrivateKey() = 0;
      virtual void setPublicKey(const std::shared_ptr<ArrayBuffer>& keyData, double format, double type) = 0;
      virtual void setPrivateKey(const std::shared_ptr<ArrayBuffer>& keyData, double format, double type) = 0;
      virtual std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>> encapsulate() = 0;
      virtual std::shared_ptr<ArrayBuffer> encapsulateSync() = 0;
      virtual std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>> decapsulate(const std::shared_ptr<ArrayBuffer>& ciphertext) = 0;
      virtual std::shared_ptr<ArrayBuffer> decapsulateSync(const std::shared_ptr<ArrayBuffer>& ciphertext) = 0;

    protected:
      // Hybrid Setup
      void loadHybridMethods() override;

    protected:
      // Tag for logging
      static constexpr auto TAG = "MlKemKeyPair";
  };

} // namespace margelo::nitro::crypto
