#include "data_acces.h" #include #include #include data_acces::data_acces() { } char* data_acces::get_hash(char *data){ unsigned char hash[SHA512_DIGEST_LENGTH]; SHA512(reinterpret_cast(data), strlen(data), hash); unsigned char* encodedData= new unsigned char[200]; EVP_EncodeBlock(encodedData, hash, sizeof (hash)); return reinterpret_cast(encodedData); }