Getting MD5 File Hash

Hi!

I need to get MD5 file hash of a file. I searched in some sources but I didn’t find any extension or component to get hash from a file in the device. (not String to MD5)

I don’t want to use any API because already I need file hash as MD5 for API. So I don’t want to use two APIs for one action.

Thanks. :slightly_smiling_face:

Did you try with this, adding the file path to the ‘text’ section? Screenshot_20190211-201142

1 Like

I can try but I’m sure this will only hash file path, not the actual file.

1 Like

If it is a text file, then use the FileRead put the file into a variable, and then apply the MD5 Hash.

1 Like

Thanks, but it is not text file. Because user will select a file. So it can be anything.

1 Like

You can encode a binary file in base64 with this extension and then apply the MD5 hash. Tested and it works, but it is very slow for big files (and sometime the application crash) and I’m not sure that the conversion to base64 is accurate because trying with various tools I get different results, but if the MD5 hash remains " locked" in your application maybe it can be useful.

3 Likes

I need stable one, thanks for help. :slightly_smiling_face: Maybe I need to learn more Java to make extension for that. :sweat_smile:

1 Like

Some good simple options here Yusuf

3 Likes

Thanks :smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.