import hashlib
hasher = hashlib.sha1()
for line in open("file", encoding="utf-8"):
hasher.update(line.strip().encode("utf-8"))
return hasher.hexdigest()
git hash-object
で逃げたかったが、超絶遅かった。(msysgit)
More than 5 years have passed since last update.
import hashlib
hasher = hashlib.sha1()
for line in open("file", encoding="utf-8"):
hasher.update(line.strip().encode("utf-8"))
return hasher.hexdigest()
git hash-object
で逃げたかったが、超絶遅かった。(msysgit)
Register as a new user and use Qiita more conveniently