1 /*! 2 * \copyright Copyright (c) 2014-2021 Governikus GmbH & Co. KG, Germany 3 */ 4 5 #pragma once 6 7 #include "CommandApduBuilder.h" 8 9 class test_Commands; 10 11 namespace governikus 12 { 13 14 class PSOBuilder 15 : public CommandApduBuilder 16 { 17 public: 18 enum class P1 : int 19 { 20 DECRYPT = 0x80, ENCRYPT = 0x86, SIGN_HASH = 0x9e, VERIFY = 0x00, 21 }; 22 23 enum class P2 : int 24 { 25 UNCRYPTED_DATA = 0x80, ENCRYPTED_DATA = 0x86, HASH_VALUE = 0x9a, CERTIFICATE = 0xbe, 26 }; 27 28 explicit PSOBuilder(P1 p1, P2 p2); 29 void setCertificateBody(const QByteArray& pData); 30 void setSignature(const QByteArray& pData); 31 CommandApdu build() override; 32 33 private: 34 friend class ::test_Commands; 35 P1 mP1; 36 P2 mP2; 37 QByteArray mCertificateBody; 38 QByteArray mSignature; 39 }; 40 41 } // namespace governikus 42