Closed pr-apes closed 1 year ago
Good point, thank you. Will be in the next version (sd:sha1()
,sd:sha256()
, sd:sha512()
and sd:md5()
for calculation and doc()
for reading file contents to get sd:sha512-file()
(sd:sha512(doc(...))
).
Many thanks for the new functionality.
@pgundlach,
I think I could provide these [or at least, I would like to try].
So, if you haven't started to work on this, let me know and I would try to submit a PR.
That way, attaching files other than ZUGFeRD could be solved first.
I think I could provide these [or at least, I would like to try].
they are already in the code base...
@pgundlach,
would it be possible that we have
sd:sha512()
andsd:sha512-file()
?https://github.com/Egor-Skriptunoff/pure_lua_SHA seems to have a much optimized code for all SHA functions in Lua.
As for abandoning SHA1, it seems not to be very safe (https://en.wikipedia.org/wiki/SHA-1#Attacks).
As for hashing files, it is also an extremely useful function.
I already use this feature (in ConTeXt) for external files (either embedded in the PDF document or not).
Many thanks for your help.