I’m using: SWI-Prolog version 9.0.4 (and 7.6.4)
I want the code to: calculate sha1 of a file
But what I’m getting is: two different results, depending on how I do it
My code looks like this:
?- file_sha1('./tom', Sum).
Sum = f572d396fae9206628714fb2ce00f72e94f2258f.
?- read_file_to_codes('./tom', Codes, []), variant_sha1(Codes, Sum).
Codes = [104, 101, 108, 108, 111, 10],
Sum = d7c7523f9bc4307dba513dcd0bd4f82e1d117774.