We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 485e175 commit eee148eCopy full SHA for eee148e
src/parsec/agent/runners/lua/impl.cpp
@@ -315,15 +315,14 @@ namespace cbdc::parsec::agent::runner {
315
size_t sz{};
316
const auto* str = lua_tolstring(L, 1, &sz);
317
assert(str != nullptr);
318
- // compute hash
319
auto sha = CSHA256();
320
auto unsigned_str = std::vector<unsigned char>(sz);
321
std::memcpy(unsigned_str.data(), str, sz);
322
sha.Write(unsigned_str.data(), sz);
323
cbdc::hash_t computed_hash{};
324
sha.Finalize(computed_hash.data());
325
lua_pushlstring(L, reinterpret_cast<char*>(computed_hash.data()), sz);
326
- return 0;
+ return 1;
327
}
328
329
0 commit comments