#ifndef VENDOR_SAMSUNG_SECURITY_PROV_TZCOMMAND_H
#define VENDOR_SAMSUNG_SECURITY_PROV_TZCOMMAND_H

#include "BaseTzCommand.h"

namespace vendor   {
namespace samsung  {
namespace hardware {
namespace security {
namespace drk      {

class ProvCommand : public BaseTzCommand
{
private:
    int32_t makeSignedCSR(Bytes& in, Bytes& out);
    int32_t checkKeyBlobFormat(uint8_t *keyBlob, uint32_t keyBlobLen, Bytes& out);

public:
    ProvCommand() {};
    ~ProvCommand() {};

    /* DRK v2, SAK */
    int32_t  GenerateSignedCSR(Bytes& in, Bytes& out);
    int32_t  GenerateEncryptedCSR(int32_t cmd, Bytes& in, Bytes& out);
    int32_t  InstallBoundKey(Bytes& in);
    int32_t  IsSupportDRKv2();

    /* GAK */
    int32_t  UnwrapKeyBlob(int32_t cmd, Bytes& in, Bytes& out);

#ifndef USE_RELEASE
    /* SelfTest */
    int32_t  VerifyDRKforSelfTest(Bytes& in, Bytes& out);
#endif
};

}  // namespace drk
}  // namespace security
}  // namespace hardware
}  // namespace samsung
}  // namespace vendor

#endif
