///
/// HybridDiffieHellmanSpec.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 <NitroModules/ArrayBuffer.hpp>

namespace margelo::nitro::crypto {

  using namespace margelo::nitro;

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

      // Destructor
      ~HybridDiffieHellmanSpec() override = default;

    public:
      // Properties
      

    public:
      // Methods
      virtual void init(const std::shared_ptr<ArrayBuffer>& prime, const std::shared_ptr<ArrayBuffer>& generator) = 0;
      virtual void initWithSize(double primeLength, double generator) = 0;
      virtual std::shared_ptr<ArrayBuffer> generateKeys() = 0;
      virtual std::shared_ptr<ArrayBuffer> computeSecret(const std::shared_ptr<ArrayBuffer>& otherPublicKey) = 0;
      virtual std::shared_ptr<ArrayBuffer> getPrime() = 0;
      virtual std::shared_ptr<ArrayBuffer> getGenerator() = 0;
      virtual std::shared_ptr<ArrayBuffer> getPublicKey() = 0;
      virtual std::shared_ptr<ArrayBuffer> getPrivateKey() = 0;
      virtual void setPublicKey(const std::shared_ptr<ArrayBuffer>& publicKey) = 0;
      virtual void setPrivateKey(const std::shared_ptr<ArrayBuffer>& privateKey) = 0;
      virtual double getVerifyError() = 0;

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

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

} // namespace margelo::nitro::crypto
