This system works really well. Except there seems to be a small problem with hashing png files. It's not a problem on the md5 library because I used different ones and I'm getting the same thing.
The problem is, any png file I hash gives me the same hash: 658e8dc0bf8b9a09b36994abf9242099
I think it's a problem with the way I'm reading the file. I'm doing:
Code: Select all
local file = io.open("MyFile.png");
local data = file:read("*all");
https://groups.google.com/forum/#!topic ... UsR8GcqZ08
And the solution was to use io.open("MyFile.png","rb") as a read mode. When I do that however, the hashing takes an extremely long time and just outputs all 0's.
Is it just not practical to do hashing with Lua like that? (This is all with LuaJIT by the way)