#ifndef ASN1_TOOLS_H_INCLUDED
#define  ASN1_TOOLS_H_INCLUDED
#include "../common/common.h"
#include "wrapper/utils/smartbuffer.h"
#include "wrapper/utils/asn1_utils_common.h"

class AsnUtils : public AsnUtilsCommon {
public:
	void EncodeSequence(PCRYPT_SEQUENCE_OF_ANY seqToEncode, PCRYPT_DER_BLOB resultBlob);
	void EncodeOID(LPSTR szOid, PCRYPT_DER_BLOB resultBlob);
	void EncodeOctetString(Handle<std::string> dataToEncode, PCRYPT_DATA_BLOB resultBlob);
	void EncodeObject(
		LPCSTR lpszStructType,
		void* pDataToEncode,
		PCRYPT_DER_BLOB pResultBlob
	);

	void DecodeObject(
		LPCSTR lpszStructType,
		const BYTE *pbEncoded,
		DWORD cbEncoded,
		void **pvStructInfo,
		DWORD *pcbStructInfo = NULL,
		LPSTR errorMessage = NULL
	);
};

#endif //!ASN1_TOOLS_H_INCLUDED
