EVP Functions was used according this OpenSSL version
https://www.openssl.org/docs/man1.0.2/man3/EVP_DigestInit.html
OpenSSL_add_all_digests();
md = EVP_get_digestbyname(argv[1]);
mdctx = EVP_MD_CTX_create();
EVP_DigestInit_ex(mdctx, md, NULL);
EVP_DigestUpdate(mdctx, mess1, strlen(mess1));
EVP_DigestFinal_ex(mdctx, md_value, &md_len);
EVP_MD_CTX_destroy(mdctx);
EVP_cleanup();