// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#pragma once
#include <vector>
#include <memory>

#include "CommonTypes.h"
#include "TssCtx.h"

class Tss2Wrapper
{
public:
    Tss2Wrapper();
    ~Tss2Wrapper() {}
    std::vector<unsigned char> Tss2RsaDecrypt(std::vector<unsigned char> const&encryptedData,
                                              RsaPaddingScheme paddingScheme);
    std::vector<unsigned char> Tss2RsaEncrypt(std::vector<unsigned char> const&plaintextData,
                                              RsaPaddingScheme paddingScheme);
    std::vector<unsigned char> Tss2NvRead(TPM2_HANDLE nvIndex);
    TPM2B_PUBLIC GenerateGuestKey();
    TPM2_RC RemoveKey();
    bool IsKeyPresent();

private:
    std::unique_ptr<TssCtx> ctx;

};