Fix #289: Fixed build problem with Visual C++

This commit is contained in:
yhirose 2019-12-13 09:12:50 -05:00
parent 72b20c08da
commit d2c7b447d5

View file

@ -2285,11 +2285,11 @@ inline std::string message_digest(const std::string &s, Init init,
size_t digest_length) {
using namespace std;
unsigned char md[digest_length];
std::vector<unsigned char> md(digest_length, 0);
CTX ctx;
init(&ctx);
update(&ctx, s.data(), s.size());
final(md, &ctx);
final(md.data(), &ctx);
stringstream ss;
for (auto c : md) {