#ifndef MTGP_PARAM_H
#define MTGP_PARAM_H

#include <stdint.h>
#include <string>
#include <openssl/sha.h>

namespace mtgp {
    template<typename T> class mtgp_param {
    public:
	void set_sha1(std::string& src) {
	    unsigned int sha1_length = SHA_DIGEST_LENGTH * 2 + 1;
	    for (unsigned int i = 0; i < sha1_length && i < src.size(); i++) {
		sha1[i] = src[i];
	    }
	    sha1[sha1_length - 1] = 0;
	};
	int mexp;
	int pos;
	int sh1;
	int sh2;
	uint32_t id;
	T mask;
	T tbl[4];
	T p[16];
	T tmp_tbl[4];
	T tp[16];
	char sha1[SHA_DIGEST_LENGTH * 2 + 1];
    };
}
#endif
