Johnnathanalmeida commented on a change in pull request #12404:
URL: https://github.com/apache/arrow/pull/12404#discussion_r815938542
##########
File path: cpp/src/gandiva/gdv_function_stubs_test.cc
##########
@@ -949,4 +950,175 @@ TEST(TestGdvFnStubs, TestMaskLastN) {
EXPECT_EQ(expected, std::string(result, out_len));
}
+TEST(TestGdvFnStubs, TestMaskHash) {
+ gandiva::ExecutionContext ctx;
+ int64_t ctx_ptr = reinterpret_cast<int64_t>(&ctx);
+ int32_t out_len = 0;
+
+ if (FIPS_mode()) {
Review comment:
I don't know how to enable this method.
This library even has a method to set FIPS_mode to true, but it didn't work,
it always disabled.
So to test the block of code that executes SHA512, I set hard code true in
this condition and compared the return of SHA512 with other external sites.
I tested all returns from sha256 and sha512 on external sites to validate:
https://emn178.github.io/online-tools/sha256.html
https://emn178.github.io/online-tools/sha512.html
https://passwordsgenerator.net/sha512-hash-generator/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]